]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | error[E0764]: mutable references are not allowed in constants |
2 | --> $DIR/projection_qualif.rs:10:27 | |
3 | | | |
4 | LL | let b: *mut u32 = &mut a; | |
5 | | ^^^^^^ `&mut` is only allowed in `const fn` | |
6 | ||
60c5eb7d XL |
7 | error[E0658]: dereferencing raw pointers in constants is unstable |
8 | --> $DIR/projection_qualif.rs:11:18 | |
9 | | | |
10 | LL | 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 | 16 | error: aborting due to 2 previous errors |
60c5eb7d | 17 | |
f035d41b XL |
18 | Some errors have detailed explanations: E0658, E0764. |
19 | For more information about an error, try `rustc --explain E0658`. |