mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 17:14:50 +00:00
13 lines
234 B
Rust
13 lines
234 B
Rust
#![feature(impl_trait_in_bindings)]
|
|
|
|
trait Static: 'static {}
|
|
impl<T: 'static> Static for T {}
|
|
|
|
struct W<T>(T);
|
|
|
|
fn main() {
|
|
let local = 0;
|
|
let _: W<impl Static> = W(&local);
|
|
//~^ ERROR `local` does not live long enough
|
|
}
|