]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr
Rollup merge of #106407 - mejrs:attr_check, r=compiler-errors
[rust.git] / tests / ui / nll / do-not-ignore-lifetime-bounds-in-copy.stderr
1 error[E0597]: `s` does not live long enough
2   --> $DIR/do-not-ignore-lifetime-bounds-in-copy.rs:8:17
3    |
4 LL |     let s = 2;
5    |         - binding `s` declared here
6 LL |     let a = Foo(&s);
7    |                 ^^ borrowed value does not live long enough
8 LL |     drop(a);
9    |          - copying this value requires that `s` is borrowed for `'static`
10 LL |     drop(a);
11 LL | }
12    | - `s` dropped here while still borrowed
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0597`.