summary refs log tree commit diff
path: root/src/test/ui/nll/user-annotations/cast_static_lifetime.rs
blob: 4756c771f6eaaa036b4bc418fd5af0cc32d3825e (plain)
1
2
3
4
5
6
7
#![allow(warnings)]
#![feature(nll)]

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