]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/promote_const_let.rs
Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff2...
[rust.git] / src / test / ui / consts / promote_const_let.rs
1 fn main() {
2     let x: &'static u32 = {
3         let y = 42;
4         &y //~ ERROR does not live long enough
5     };
6     let x: &'static u32 = &{ //~ ERROR temporary value dropped while borrowed
7         let y = 42;
8         y
9     };
10 }