]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-52663-trait-object.rs
Auto merge of #105145 - Ayush1325:sequential-remote-server, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / issue-52663-trait-object.rs
1 trait Foo { fn get(&self); }
2
3 impl<A> Foo for A {
4     fn get(&self) { }
5 }
6
7
8
9 fn main() {
10     let _ = {
11         let tmp0 = 3;
12         let tmp1 = &tmp0;
13         Box::new(tmp1) as Box<dyn Foo + '_>
14     };
15     //~^^^ ERROR `tmp0` does not live long enough
16 }