diff options
Diffstat (limited to 'src/test/ui/compile-fail-migration/object-lifetime-default-from-box-error.stderr')
| -rw-r--r-- | src/test/ui/compile-fail-migration/object-lifetime-default-from-box-error.stderr | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/compile-fail-migration/object-lifetime-default-from-box-error.stderr b/src/test/ui/compile-fail-migration/object-lifetime-default-from-box-error.stderr new file mode 100644 index 00000000000..9972930c13e --- /dev/null +++ b/src/test/ui/compile-fail-migration/object-lifetime-default-from-box-error.stderr @@ -0,0 +1,21 @@ +error[E0621]: explicit lifetime required in the type of `ss` + --> $DIR/object-lifetime-default-from-box-error.rs:28:5 + | +LL | fn load(ss: &mut SomeStruct) -> Box<SomeTrait> { + | --------------- help: add explicit lifetime `'static` to the type of `ss`: `&mut SomeStruct<'static>` +... +LL | ss.r //~ ERROR explicit lifetime required in the type of `ss` [E0621] + | ^^^^ lifetime `'static` required + +error[E0621]: explicit lifetime required in the type of `ss` + --> $DIR/object-lifetime-default-from-box-error.rs:41:12 + | +LL | fn store1<'b>(ss: &mut SomeStruct, b: Box<SomeTrait+'b>) { + | --------------- help: add explicit lifetime `'b` to the type of `ss`: `&mut SomeStruct<'b>` +... +LL | ss.r = b; //~ ERROR 41:12: 41:13: explicit lifetime required in the type of `ss` [E0621] + | ^ lifetime `'b` required + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0621`. |
