blob: fe9188cb4904c99eed1022964c1a10a62467024d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#![feature(raw_ref_op)]
const A: () = { let mut x = 2; &raw mut x; }; //~ ERROR `&raw mut` is not allowed
static B: () = { let mut x = 2; &raw mut x; }; //~ ERROR `&raw mut` is not allowed
static mut C: () = { let mut x = 2; &raw mut x; }; //~ ERROR `&raw mut` is not allowed
const fn foo() {
let mut x = 0;
let y = &raw mut x; //~ ERROR `&raw mut` is not allowed
}
fn main() {}
|