]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/static_mut_containing_mut_ref2.stderr
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / static_mut_containing_mut_ref2.stderr
1 error[E0017]: references in statics may only refer to immutable values
2   --> $DIR/static_mut_containing_mut_ref2.rs:3:46
3    |
4 LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
5    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^ statics require immutable values
6
7 error[E0019]: static contains unimplemented expression type
8   --> $DIR/static_mut_containing_mut_ref2.rs:3:45
9    |
10 LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
11    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error: aborting due to 2 previous errors
14
15 Some errors have detailed explanations: E0017, E0019.
16 For more information about an error, try `rustc --explain E0017`.