]> git.proxmox.com Git - rustc.git/blame - src/test/ui/error-codes/E0388.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / error-codes / E0388.stderr
CommitLineData
60c5eb7d 1error[E0658]: references in constants may only refer to immutable values
0731742a 2 --> $DIR/E0388.rs:4:30
2c00a5a8 3 |
532ac7d7 4LL | const CR: &'static mut i32 = &mut C;
2c00a5a8 5 | ^^^^^^ constants require immutable values
60c5eb7d
XL
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
2c00a5a8 9
60c5eb7d 10error[E0019]: static contains unimplemented expression type
0731742a 11 --> $DIR/E0388.rs:5:39
a1dfa0c6 12 |
532ac7d7 13LL | static STATIC_REF: &'static mut i32 = &mut X;
60c5eb7d 14 | ^^^^^^
a1dfa0c6 15
60c5eb7d 16error[E0658]: references in statics may only refer to immutable values
0731742a 17 --> $DIR/E0388.rs:5:39
2c00a5a8 18 |
532ac7d7 19LL | static STATIC_REF: &'static mut i32 = &mut X;
60c5eb7d
XL
20 | ^^^^^^ statics require immutable values
21 |
22 = note: for more information, see https://github.com/rust-lang/rust/issues/57349
23 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2c00a5a8 24
48663c56
XL
25error[E0596]: cannot borrow immutable static item `X` as mutable
26 --> $DIR/E0388.rs:5:39
2c00a5a8 27 |
532ac7d7 28LL | static STATIC_REF: &'static mut i32 = &mut X;
48663c56 29 | ^^^^^^ cannot borrow as mutable
2c00a5a8 30
60c5eb7d 31error[E0658]: references in statics may only refer to immutable values
0731742a 32 --> $DIR/E0388.rs:8:38
2c00a5a8 33 |
532ac7d7 34LL | static CONST_REF: &'static mut i32 = &mut C;
2c00a5a8 35 | ^^^^^^ statics require immutable values
60c5eb7d
XL
36 |
37 = note: for more information, see https://github.com/rust-lang/rust/issues/57349
38 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2c00a5a8 39
a1dfa0c6 40error: aborting due to 5 previous errors
2c00a5a8 41
60c5eb7d
XL
42Some errors have detailed explanations: E0019, E0596, E0658.
43For more information about an error, try `rustc --explain E0019`.