rust/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00

11 lines
351 B
Plaintext

error: lifetime may not live long enough
--> $DIR/object-lifetime-default-from-rptr-struct-error.rs:20:5
|
LL | fn c<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
| -- lifetime `'a` defined here
LL | ss.t = t;
| ^^^^^^^^ assignment requires that `'a` must outlive `'static`
error: aborting due to 1 previous error