mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-29 16:46:09 +00:00
15 lines
384 B
Rust
15 lines
384 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
|
|
|
|
static mut C: () = { 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() {}
|