mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 12:37:37 +00:00
11 lines
230 B
Rust
11 lines
230 B
Rust
#![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
|
|
}
|