]> git.proxmox.com Git - rustc.git/blob - tests/ui/rfcs/rfc-2528-type-changing-struct-update/lifetime-update.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / rfcs / rfc-2528-type-changing-struct-update / lifetime-update.stderr
1 error[E0597]: `s` does not live long enough
2 --> $DIR/lifetime-update.rs:20:17
3 |
4 LL | let s = String::from("hello");
5 | - binding `s` declared here
6 ...
7 LL | lt_str: &s,
8 | ^^ borrowed value does not live long enough
9 ...
10 LL | let m2: Machine<'static, State1> = Machine {
11 | ------------------------ type annotation requires that `s` is borrowed for `'static`
12 ...
13 LL | }
14 | - `s` dropped here while still borrowed
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.