rust/src/test/ui/consts/static_mut_containing_mut_ref2.stderr

20 lines
937 B
Plaintext
Raw Normal View History

error[E0658]: references in statics may only refer to immutable values
--> $DIR/static_mut_containing_mut_ref2.rs:3:46
2018-12-17 07:20:42 -06:00
|
LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ statics require immutable values
|
= note: for more information, see https://github.com/rust-lang/rust/issues/57349
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2018-12-17 07:20:42 -06:00
2018-12-21 06:39:45 -06:00
error[E0019]: static contains unimplemented expression type
--> $DIR/static_mut_containing_mut_ref2.rs:3:45
2018-12-21 06:39:45 -06:00
|
LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
2018-12-17 07:20:42 -06:00
Some errors have detailed explanations: E0019, E0658.
For more information about an error, try `rustc --explain E0019`.