mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
13 lines
307 B
Rust
13 lines
307 B
Rust
#![feature(raw_ref_op)]
|
|
|
|
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() {}
|