]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/coercion-generic-regions.stderr
core: Support variety of atomic widths in width-agnostic functions
[rust.git] / tests / ui / traits / coercion-generic-regions.stderr
1 error[E0597]: `person` does not live long enough
2   --> $DIR/coercion-generic-regions.rs:17:24
3    |
4 LL |     let person: &str = &person;
5    |                        ^^^^^^^
6    |                        |
7    |                        borrowed value does not live long enough
8    |                        assignment requires that `person` is borrowed for `'static`
9 LL |     let s: Box<dyn Trait<&'static str>> = Box::new(Struct { person: person });
10 LL | }
11    | - `person` dropped here while still borrowed
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0597`.