2024-10-24 03:32:23 +00:00
|
|
|
//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 };
|
2025-04-20 10:51:19 +09:00
|
|
|
//~^WARN creating a shared reference to mutable static
|
2024-10-24 03:32:23 +00:00
|
|
|
|
2025-04-20 10:51:19 +09:00
|
|
|
let _ = unsafe { (&mut TEST) as *const usize };
|
|
|
|
|
//~^WARN creating a mutable reference to mutable static
|
2024-10-24 03:32:23 +00:00
|
|
|
}
|