rust/tests/ui/consts/const-address-of-mut.rs
2024-09-15 09:51:32 +02:00

13 lines
186 B
Rust

//@check-pass
const A: () = { let mut x = 2; &raw mut x; };
static B: () = { let mut x = 2; &raw mut x; };
const fn foo() {
let mut x = 0;
let y = &raw mut x;
}
fn main() {}