]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-address-of-mut.rs
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / const-address-of-mut.rs
1 #![feature(raw_ref_op)]
2
3 const A: () = { let mut x = 2; &raw mut x; };           //~ mutable reference
4
5 static B: () = { let mut x = 2; &raw mut x; };          //~ mutable reference
6
7 static mut C: () = { let mut x = 2; &raw mut x; };      //~ mutable reference
8
9 const fn foo() {
10     let mut x = 0;
11     let y = &raw mut x;                                 //~ mutable reference
12 }
13
14 fn main() {}