-
Notifications
You must be signed in to change notification settings - Fork 562
get rid of const.no-mut-refs #2080
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
Conversation
|
FCP passed, rust-lang/rust#148746 is in the bors queue now. |
The rule is that "mutable references contained within a mutable static may be referenced in the final value of a constant." However, the key here is that "mutable static" means either a `static mut` item or a `static` item with an interior mutable type. We had made that clear over in `const-eval.const-expr.path-static` but not in our rules about const item validity, and our link for "mutable static" had implied it may mean `static mut`. Let's fix that and add an example to demonstrate the point.
These link reference definitions were used in `const.no-mut-refs` and are no longer needed.
29413ec to
b666677
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I had a WIP commit to clean up the language we're about to delete. If the commit looks OK to you, I'd like to put this in the history for posterity's stake. I've stacked your commit onto it and also deleted the link reference definitions that are now unused. |
|
LGTM, thanks! |
Pulls in rust-lang/reference#2080 to fix the tests.
Update reference Pulls in rust-lang/reference#2080 to fix the tests. Closes #149575
The reference PR that goes with rust-lang/rust#148746.
Fixes #2074.