fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.0 KiB28 linesraw
1error[E0658]: references in constants may only refer to immutable values
2  --> $DIR/projection_qualif.rs:10:27
3   |
4LL |         let b: *mut u32 = &mut a;
5   |                           ^^^^^^ constants require immutable values
6   |
7   = note: for more information, see https://github.com/rust-lang/rust/issues/57349
8   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
9
10error[E0658]: dereferencing raw pointers in constants is unstable
11  --> $DIR/projection_qualif.rs:11:18
12   |
13LL |         unsafe { *b = 5; }
14   |                  ^^^^^^
15   |
16   = note: for more information, see https://github.com/rust-lang/rust/issues/51911
17   = help: add `#![feature(const_raw_ptr_deref)]` to the crate attributes to enable
18
19error[E0019]: constant contains unimplemented expression type
20  --> $DIR/projection_qualif.rs:11:18
21   |
22LL |         unsafe { *b = 5; }
23   |                  ^^^^^^
24
25error: aborting due to 3 previous errors
26
27Some errors have detailed explanations: E0019, E0658.
28For more information about an error, try `rustc --explain E0019`.