-
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
Catch PartialEq not being Object Safe #22040
Comments
Comment: PartialEq can be object safe, if you substitute the |
1.0 beta, P-backcompat-lang. |
Ah, I see, the problem is actually related to defaults. That is, |
Never mind that last comment. I'm not 100% sure what I think is the right change here, but it is probably as simple as saying that an object-safe trait may not reference |
The big change here is that we update the object-safety rules to prohibit references to `Self` in the supertrait listing. See rust-lang#22040 for the motivation. The other change is to handle the interaction of defaults that reference `Self` and object types (where `Self` is erased). We force users to give an explicit type in that scenario. r? @aturon
Thanks for fixing this niko, this is beautiful.
|
Silent corruption, from this user post
The following code compiles and runs, but produces bogus result. PartialEq and thus Expr are not object safe, and because of that
Box<Expr>
should have been rejected.Just this is the ICE case in #18956
The text was updated successfully, but these errors were encountered: