fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
590 B15 linesraw
1error[E0597]: `tmp0` does not live long enough
2  --> $DIR/issue-52663-trait-object.rs:12:20
3   |
4LL |         let tmp0 = 3;
5   |             ---- binding `tmp0` declared here
6LL |         let tmp1 = &tmp0;
7   |                    ^^^^^ borrowed value does not live long enough
8LL |         Box::new(tmp1) as Box<dyn Foo + '_>
9   |         ----------------------------------- borrow later captured here by trait object
10LL |     };
11   |     - `tmp0` dropped here while still borrowed
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0597`.