rust/tests/ui/impl-trait/in-bindings/nesting-lifetime-failure.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
230 B
Rust
Raw Normal View History

2024-12-11 22:18:39 +00:00
#![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
}