]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0597]: `person` does not live long enough |
48663c56 | 2 | --> $DIR/trait-coercion-generic-regions.rs:17:24 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | 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 | 9 | LL | let s: Box<dyn Trait<&'static str>> = Box::new(Struct { person: person }); |
b7449926 | 10 | LL | } |
48663c56 | 11 | | - `person` dropped here while still borrowed |
b7449926 XL |
12 | |
13 | error: aborting due to previous error | |
14 | ||
15 | For more information about this error, try `rustc --explain E0597`. |