Impact of fixing subtyping for object types #18737


The current rustc implementation has subtyping rules for object types that are a bit…dated. They are tied to the notion of builtin traits, a notion which (with OIBIT) is largely going away – and they are not future-proof against a lot of the extensions to object types we’d like to do (upcasting, arbitrary combinations of traits, etc). I’ve got a plan to change them, but it makes method resolution around object types work a bit differently than it did before. In terms of libstd, only the Any API is affected – basically, for the time being, I think it’d be best to convert Any to use free fns, so that dispatch on &(Any+Send) works smoothly. However, I wanted to raise this to a wider audience than just those who happen to be cc’d on the GH issue.

If you’re interested in more details, please see my comment here: