1 // Test that, when a variable of type `&T` is captured inside a proc,
2 // we correctly infer/require that its lifetime is 'static.
4 fn foo<F:FnOnce()+'static>(_p: F) { }
10 let y = &x; //~ ERROR `x` does not live long enough
17 // Legal because &i can have static lifetime: