about summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-bindings/nesting-lifetime-failure.rs
blob: 7e5d2cf18bd7d8eb2dc22a171eecab4467355d85 (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(impl_trait_in_bindings)]

trait Static {}
impl<T: 'static> Static for T {}

fn main() {
    let local = 0;
    let _: impl IntoIterator<Item = impl Static> = [&local];
    //~^ ERROR `local` does not live long enough
}