summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-address-of-mut.rs
blob: 3788088b810b9e51e6ae444d0e470a63a3c55a5c (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; };           //~ 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() {}