@keean is correct that Rust doesn't allow subsumption.
Playground URL: Rust Playground
Gist URL: Shared via Rust Playground · GitHub
But other popular languages ostensibly do, so afaics there are two remaining issues to sort out:
-
Do the other languages which offer subsumption (for references to mutable instances) exhibit the unsafety I have alleged?
-
What composability and extension does Rust lose by not allowing any subtyping? How will we express the various use cases? Must we employ OOHaskell idioms to get the functionality we need for use cases?
Edit: and afaics if Rust doesn't have subsumption subtyping that is going to cause a cascade of issues with composability. But those are details we will have to sort out, as I think we are by analyzing use cases and how to code them in Rust. If I am not mistaken, you seem to be implying that we can model the necessary composability using concepts from OOHaskell.