]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-multi-ref.rs
Auto merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, r=nikomatsakis
[rust.git] / src / test / ui / consts / const-multi-ref.rs
1 const _X: i32 = {
2     let mut a = 5;
3     let p = &mut a;      //~ ERROR references in constants may only refer to immutable values
4
5     let reborrow = {p};  //~ ERROR references in constants may only refer to immutable values
6     let pp = &reborrow;
7     let ppp = &pp;
8     ***ppp
9 };
10
11 fn main() {}