]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/trait-coercion-generic-regions.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / trait-coercion-generic-regions.stderr
CommitLineData
b7449926 1error[E0597]: `person` does not live long enough
48663c56 2 --> $DIR/trait-coercion-generic-regions.rs:17:24
b7449926 3 |
532ac7d7 4LL | let person: &str = &person;
48663c56
XL
5 | ^^^^^^^
6 | |
7 | borrowed value does not live long enough
8 | assignment requires that `person` is borrowed for `'static`
dc9dc135 9LL | let s: Box<dyn Trait<&'static str>> = Box::new(Struct { person: person });
b7449926 10LL | }
48663c56 11 | - `person` dropped here while still borrowed
b7449926
XL
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0597`.