-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Remove self: Self
methods from vtables
#114260
Conversation
The job Click to see the possible cause of the failure (guessed by this bot)
|
= help: consider moving `test` to another trait | ||
= help: consider moving `test` to another trait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think users need that much help when getting the error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You see, this is tricky, because those lines are triggered by different errors:
rust/compiler/rustc_middle/src/traits/mod.rs
Lines 866 to 869 in a17c796
ObjectSafetyViolation::AssocConst(name, _) | |
| ObjectSafetyViolation::GAT(name, _) | |
| ObjectSafetyViolation::Method(name, ..) => { | |
err.help(format!("consider moving `{name}` to another trait")); |
I couldn't find an easy way to fix this...
It is possible to call a |
I thought that this is not a problem, given that we planned to remove unsized locals stuff and |
We want to remove unsized locals, but afaik not unsized params. |
Yeah, if that's the case, nothing can really be done here. For unsized params we need to have the entries in the vtable. And we can't check if the feature is enabled or not, because upstream crates can enable it. |
Return multiple object-safety violation errors and code improvements to the object-safety check See individual commits for more information. Split off of rust-lang#114260, since it turned out that the main intent of that PR was wrong. r? oli-obk
Rollup merge of rust-lang#116401 - WaffleLapkin:vtablin''', r=oli-obk Return multiple object-safety violation errors and code improvements to the object-safety check See individual commits for more information. Split off of rust-lang#114260, since it turned out that the main intent of that PR was wrong. r? oli-obk
Fixes #114007
This turned out to be a lot more complex than I'd wished for, eh. Maybe someone has better ideas?
cc @compiler-errors
r? @oli-obk