]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/promote_const_let.rs
Rollup merge of #107058 - clubby789:eqeq-homoglyph, r=wesleywiser
[rust.git] / tests / 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 }