about summary refs log tree commit diff
path: root/src/test/ui/underscore-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/underscore-lifetime
parent9309e2ef0706ab31f0507e38ad49281a8c38f6cb (diff)
downloadrust-7f7fadaee6358191fce04debb63bf0bfe0cb2a9e.tar.gz
rust-7f7fadaee6358191fce04debb63bf0bfe0cb2a9e.zip
Also use smaller spans for unsize adjustments
Diffstat (limited to 'src/test/ui/underscore-lifetime')
-rw-r--r--src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr
index 799b0982b94..58939b0f64f 100644
--- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr
+++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr
@@ -23,16 +23,13 @@ LL |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: unsatisfied lifetime constraints
-  --> $DIR/dyn-trait-underscore.rs:16:52
+  --> $DIR/dyn-trait-underscore.rs:18:5
    |
-LL |   fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> {
-   |  ________________-___________________________________^
-   | |                |
-   | |                let's call the lifetime of this reference `'1`
-LL | |     //                      ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static`
-LL | |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
-LL | | }
-   | |_^ returning this value requires that `'1` must outlive `'static`
+LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> {
+   |                - let's call the lifetime of this reference `'1`
+LL |     //                      ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static`
+LL |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
+   |     ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static`
 
 error: aborting due to previous error