-
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
Adjust cannot move out of static error in prep for removing Statics from Place #66328
Adjust cannot move out of static error in prep for removing Statics from Place #66328
Conversation
cc @rust-lang/wg-diagnostics By using a more general error message, we can in the future treat reading from a static |
How is this unifying anything? This is replacing one special-cased error message with a worse special-cased error message. |
@matthewjasper going to provide another PR that changes the |
That sounds even worse. That would be regressing diagnostics across 2 PRs so that a third PR can be slightly smaller? |
@matthewjasper yeah I've said that because those are the unified errors, the ones about statics and the ones about borrows. I guess I understand what you meant, the errors are going to regress but it's the drawback of the idea that @oli-obk explained above. I could provide one PR for each error, one PR for all of them or one PR for all the work. It doesn't change much to me, @oli-obk wanted me to split things for easier review. I'd do whatever you and @oli-obk prefer, it's the same for me. @matthewjasper just in case I did get something wrong, are you against the Static change because of diagnostics are going to regress? or is it that you just prefer everything in one PR?. |
I definitely think removing I also think that it would be possible to avoid the regression entirely without that much work. I can try to have a PR that moves all |
☔ The latest upstream changes (presumably #66170) made this pull request unmergeable. Please resolve the merge conflicts. |
Huh, interesting. Can you elaborate on how you think this could be done? Add a new |
So: I don't know if I understood what you meant in your previous cited sentence. Did you mean that the diagnostic
I think this changes everything 😄, I have the same question @oli-obk asked, can you elaborate more?. I could also tackle this as part of the bigger change. |
The plan would be to move the information currently in Thinking about this some more I'll do (enough of) the |
I don't think the "shared" part of "shared reference" or "immutable" part of "immutable place" are relevant. The important thing is that you don't own the place, be it a dereference or a |
Ping from triage |
This is no longer needed. |
This is in preparation to remove Statics from Place. We are going to loose some information on Mir so we need to make these static errors a bit more generic.
r? @oli-obk