From 7f7fadaee6358191fce04debb63bf0bfe0cb2a9e Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Mon, 27 Aug 2018 12:36:49 +0100 Subject: Also use smaller spans for unsize adjustments --- .../object-lifetime-default-from-box-error.nll.stderr | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/test/ui/object-lifetime') diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr index 5cfced1a72f..19279b53c1c 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr @@ -11,18 +11,13 @@ LL | ss.r = b; //~ ERROR 41:12: 41:13: explicit lifetime required in the typ | ^ error[E0621]: explicit lifetime required in the type of `ss` - --> $DIR/object-lifetime-default-from-box-error.rs:24:48 + --> $DIR/object-lifetime-default-from-box-error.rs:28:5 | -LL | fn load(ss: &mut SomeStruct) -> Box { - | _____________---------------____________________^ - | | | - | | help: add explicit lifetime `'static` to the type of `ss`: `&mut SomeStruct<'static>` -LL | | // `Box` defaults to a `'static` bound, so this return -LL | | // is illegal. -LL | | -LL | | ss.r //~ ERROR explicit lifetime required in the type of `ss` [E0621] -LL | | } - | |_^ lifetime `'static` required +LL | fn load(ss: &mut SomeStruct) -> Box { + | --------------- 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[E0507]: cannot move out of borrowed content --> $DIR/object-lifetime-default-from-box-error.rs:28:5 -- cgit 1.4.1-3-g733a5