rust/tests/ui/consts/const-address-of-mut.rs
2024-08-18 19:46:53 +02:00

11 lines
282 B
Rust

const A: () = { let mut x = 2; &raw mut x; }; //~ mutable pointer
static B: () = { let mut x = 2; &raw mut x; }; //~ mutable pointer
const fn foo() {
let mut x = 0;
let y = &raw mut x; //~ mutable pointer
}
fn main() {}