summary refs log tree commit diff
path: root/src/test/ui/object-lifetime
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2018-08-27 12:36:49 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2018-08-27 12:36:49 +0100
commit7f7fadaee6358191fce04debb63bf0bfe0cb2a9e (patch)
treede7aced2c345a80900e10cb5062afd1d14289b51 /src/test/ui/object-lifetime
parent9309e2ef0706ab31f0507e38ad49281a8c38f6cb (diff)
downloadrust-7f7fadaee6358191fce04debb63bf0bfe0cb2a9e.tar.gz
rust-7f7fadaee6358191fce04debb63bf0bfe0cb2a9e.zip
Also use smaller spans for unsize adjustments
Diffstat (limited to 'src/test/ui/object-lifetime')
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr17
1 files changed, 6 insertions, 11 deletions
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<SomeTrait> {
-   |  _____________---------------____________________^
-   | |             |
-   | |             help: add explicit lifetime `'static` to the type of `ss`: `&mut SomeStruct<'static>`
-LL | |     // `Box<SomeTrait>` 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<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[E0507]: cannot move out of borrowed content
   --> $DIR/object-lifetime-default-from-box-error.rs:28:5