about summary refs log tree commit diff
path: root/tests/ui/consts/const-address-of-mut.rs
blob: 2dd909b4ce74ac339434e2668180aec784db4490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@check-pass

const A: () = { let mut x = 2; &raw mut x; };

static B: () = { let mut x = 2; &raw mut x; };

const fn foo() {
    let mut x = 0;
    let y = &raw mut x;
}

fn main() {}