-
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
Unify const-checking structured errors for &mut
and &raw mut
#77420
Unify const-checking structured errors for &mut
and &raw mut
#77420
Conversation
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
f64ec95
to
c1494d6
Compare
@@ -1,14 +1,14 @@ | |||
#![feature(raw_ref_op)] | |||
|
|||
const A: () = { let mut x = 2; &raw mut x; }; //~ ERROR `&raw mut` is not allowed | |||
const A: () = { let mut x = 2; &raw mut x; }; //~ mutable reference |
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.
Should this test's annotations still have ERROR
in them?
const A: () = { let mut x = 2; &raw mut x; }; //~ mutable reference | |
const A: () = { let mut x = 2; &raw mut x; }; //~ ERROR mutable reference |
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.
Why?
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 was under the impression that it was required for the annotation.
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.
it's good to have but not a necessity iirc.
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.
LGTM, r=me after resolving previous comment
@bors r=davidtwco |
📌 Commit c1494d6 has been approved by |
Rollup of 10 pull requests Successful merges: - rust-lang#77420 (Unify const-checking structured errors for `&mut` and `&raw mut`) - rust-lang#77554 (Support signed integers and `char` in v0 mangling) - rust-lang#77976 (Mark inout asm! operands as used in liveness pass) - rust-lang#78009 (Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling) - rust-lang#78084 (Greatly improve display for small mobile devices screens) - rust-lang#78155 (Fix two small issues in compiler/rustc_lint/src/types.rs) - rust-lang#78156 (Fixed build failure of `rustfmt`) - rust-lang#78172 (Add test case for rust-lang#77062) - rust-lang#78188 (Add tracking issue number for pin_static_ref) - rust-lang#78200 (Add `ControlFlow::is_{break,continue}` methods) Failed merges: r? `@ghost`
Resolves #77414 as well as a FIXME.