summary refs log tree commit diff
path: root/src/test/ui/consts/const-multi-ref.rs
blob: 498e99e668b43312c95db24106d7066881377a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
const _X: i32 = {
    let mut a = 5;
    let p = &mut a;      //~ ERROR references in constants may only refer to immutable values

    let reborrow = {p};  //~ ERROR references in constants may only refer to immutable values
    let pp = &reborrow;
    let ppp = &pp;
    ***ppp
};

fn main() {}