2019-09-18 21:31:25 +01:00
|
|
|
#![feature(raw_ref_op)]
|
|
|
|
|
2023-12-17 11:24:34 +01:00
|
|
|
const A: () = { let mut x = 2; &raw mut x; }; //~ mutable pointer
|
2019-09-18 21:31:25 +01:00
|
|
|
|
2023-12-17 11:24:34 +01:00
|
|
|
static B: () = { let mut x = 2; &raw mut x; }; //~ mutable pointer
|
2019-09-18 21:31:25 +01:00
|
|
|
|
|
|
|
const fn foo() {
|
|
|
|
let mut x = 0;
|
2023-12-17 11:24:34 +01:00
|
|
|
let y = &raw mut x; //~ mutable pointer
|
2019-09-18 21:31:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|