mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
15 lines
392 B
Rust
15 lines
392 B
Rust
#![feature(raw_ref_op)]
|
|
|
|
const A: () = { let mut x = 2; &raw mut x; }; //~ mutable reference
|
|
|
|
static B: () = { let mut x = 2; &raw mut x; }; //~ mutable reference
|
|
|
|
static mut C: () = { let mut x = 2; &raw mut x; }; //~ mutable reference
|
|
|
|
const fn foo() {
|
|
let mut x = 0;
|
|
let y = &raw mut x; //~ mutable reference
|
|
}
|
|
|
|
fn main() {}
|