mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
14 lines
394 B
Rust
14 lines
394 B
Rust
//Missing paren in diagnostic msg: https://github.com/rust-lang/rust/issues/131977
|
|
//@check-pass
|
|
|
|
|
|
static mut TEST: usize = 0;
|
|
|
|
fn main() {
|
|
let _ = unsafe { (&TEST) as *const usize };
|
|
//~^WARN creating a shared reference to mutable static is discouraged
|
|
|
|
let _ = unsafe { ((&mut TEST)) as *const usize };
|
|
//~^WARN creating a mutable reference to mutable static is discouraged
|
|
}
|