fork/rust

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

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

master
533 B16 linesraw
1error[E0597]: `s` does not live long enough
2  --> $DIR/do-not-ignore-lifetime-bounds-in-copy.rs:8:17
3   |
4LL |     let s = 2;
5   |         - binding `s` declared here
6LL |     let a = Foo(&s);
7   |                 ^^ borrowed value does not live long enough
8LL |     drop(a);
9   |          - copying this value requires that `s` is borrowed for `'static`
10LL |     drop(a);
11LL | }
12   | - `s` dropped here while still borrowed
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0597`.