> For example `-> impl Trait` return types famously leak the `Send`/`Sync`-ness of the type,
Doesn't that mean that the return type isn't actually fully specified? That sounds wild to me. How did they end up there?
Doesn't that mean that the return type isn't actually fully specified? That sounds wild to me. How did they end up there?
https://rust-lang.github.io/rfcs/1522-conservative-impl-trai...
(OIBIT = auto trait, like Send/Sync)
- It would have been very annoying if it didn't work like this
- Auto-traits also leak through private fields, so you would have the same issue if you e.g. wrapped the concrete return type in a new type and returned that one instead.