diff options
Diffstat (limited to 'tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr')
-rw-r--r-- | tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr new file mode 100644 index 000000000..7d6f9f39d --- /dev/null +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/object-lifetime-default-from-rptr-box-error.rs:15:5 + | +LL | fn c<'a>(t: &'a Box<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 previous error + |