summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/user-annotations/cast_static_lifetime.rs
blob: bb6129dacda8d1e2368c426d6bf9421e09831966 (plain)
1
2
3
4
5
6
#![allow(warnings)]

fn main() {
    let x = 22_u32;
    let y: &u32 = (&x) as &'static u32; //~ ERROR `x` does not live long enough
}