]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/projection_qualif.mut_refs.stderr
New upstream version 1.50.0+dfsg1
[rustc.git] / src / test / ui / consts / projection_qualif.mut_refs.stderr
CommitLineData
f035d41b
XL
1error[E0764]: mutable references are not allowed in constants
2 --> $DIR/projection_qualif.rs:10:27
3 |
4LL | let b: *mut u32 = &mut a;
5 | ^^^^^^ `&mut` is only allowed in `const fn`
6
60c5eb7d
XL
7error[E0658]: dereferencing raw pointers in constants is unstable
8 --> $DIR/projection_qualif.rs:11:18
9 |
10LL | unsafe { *b = 5; }
11 | ^^^^^^
12 |
74b04a01 13 = note: see issue #51911 <https://github.com/rust-lang/rust/issues/51911> for more information
60c5eb7d
XL
14 = help: add `#![feature(const_raw_ptr_deref)]` to the crate attributes to enable
15
f035d41b 16error: aborting due to 2 previous errors
60c5eb7d 17
f035d41b
XL
18Some errors have detailed explanations: E0658, E0764.
19For more information about an error, try `rustc --explain E0658`.