rust/src/test/ui/issues/issue-17718-const-bad-values.stderr
2019-04-18 13:29:28 -04:00

23 lines
919 B
Plaintext

error[E0017]: references in constants may only refer to immutable values
--> $DIR/issue-17718-const-bad-values.rs:1:34
|
LL | const C1: &'static mut [usize] = &mut [];
| ^^^^^^^ constants require immutable values
error[E0017]: references in constants may only refer to immutable values
--> $DIR/issue-17718-const-bad-values.rs:5:41
|
LL | const C2: &'static mut usize = unsafe { &mut S };
| ^^^^^^ constants require immutable values
error[E0013]: constants cannot refer to statics, use a constant instead
--> $DIR/issue-17718-const-bad-values.rs:5:41
|
LL | const C2: &'static mut usize = unsafe { &mut S };
| ^^^^^^
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0013, E0017.
For more information about an error, try `rustc --explain E0013`.