]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-52663-trait-object.rs
fix merge conflicts
[rust.git] / src / test / ui / nll / issue-52663-trait-object.rs
1 #![feature(box_syntax)]
2
3 trait Foo { fn get(&self); }
4
5 impl<A> Foo for A {
6     fn get(&self) { }
7 }
8
9 fn main() {
10     let _ = {
11         let tmp0 = 3;
12         let tmp1 = &tmp0;
13         box tmp1 as Box<Foo + '_>
14     };
15     //~^^^ ERROR `tmp0` does not live long enough
16 }