-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coherence with object types with overlapping supertrait projections is incomplete #133361
Comments
The reason this fails is because we store object types as fully elaborated lists of projections, but deduplicate them after substitution when they come identical. Think of We then check that these lists are the same length, and if they're not, we return a "type mismatch". In effect, we consider the types to be not equal, which also means that we consider two impls to not overlap. |
I'm actually somewhat afraid that a general solution to matching up the projections in various states of substitution and deduplication is impossible to solve; however, I think I have in mind a set of restrictions that we may be able to impose that is both not too restrictive but prevents this issue in general. I'll noodle a bit on this... @rustbot claim |
[CRATER] Detect cases when user written object assoc bound differs from elaborated non-self-referential bound an experiment relating to a potential fix for rust-lang#133361 r? `@ghost`
…ss, r=<try> Fix dyn incompleteness with multiple supertraits with different substitutions So much to write about this. Fixes rust-lang#133361 r? `@ghost`
…ss, r=<try> Fix dyn incompleteness with multiple supertraits with different substitutions So much to write about this. Fixes rust-lang#133361 r? `@ghost`
…ss, r=<try> Fix dyn incompleteness with multiple supertraits with different substitutions So much to write about this. Fixes rust-lang#133361 r? `@ghost`
…ss, r=<try> Fix dyn incompleteness with multiple supertraits with different substitutions So much to write about this. Fixes rust-lang#133361 r? `@ghost`
I tried this code:
I expected to see this happen: It does not work.
Instead, this happened: Segfault
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: