]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/regions/regions-close-param-into-object.nll.stderr
Bless tests
[rust.git] / src / test / ui / regions / regions-close-param-into-object.nll.stderr
index 7bd7824f00a462ccebf0da80ebbc0aa95c385ccc..f0464e299bbec169dcafab57725ae04f9742efc0 100644 (file)
@@ -1,34 +1,38 @@
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-param-into-object.rs:6:5
    |
+LL | fn p1<T>(v: T) -> Box<dyn X + 'static>
+   |       - help: consider adding an explicit lifetime bound...: `T: 'static`
+...
 LL |     Box::new(v)
-   |     ^^^^^^^^^^^
-   |
-   = help: consider adding an explicit lifetime bound `T: 'static`...
+   |     ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
 
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-param-into-object.rs:12:5
    |
+LL | fn p2<T>(v: Box<T>) -> Box<dyn X + 'static>
+   |       - help: consider adding an explicit lifetime bound...: `T: 'static`
+...
 LL |     Box::new(v)
-   |     ^^^^^^^^^^^
-   |
-   = help: consider adding an explicit lifetime bound `T: 'static`...
+   |     ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
 
 error[E0309]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-param-into-object.rs:18:5
    |
+LL | fn p3<'a,T>(v: T) -> Box<dyn X + 'a>
+   |          - help: consider adding an explicit lifetime bound...: `T: 'a`
+...
 LL |     Box::new(v)
-   |     ^^^^^^^^^^^
-   |
-   = help: consider adding an explicit lifetime bound `T: 'a`...
+   |     ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
 
 error[E0309]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-param-into-object.rs:24:5
    |
+LL | fn p4<'a,T>(v: Box<T>) -> Box<dyn X + 'a>
+   |          - help: consider adding an explicit lifetime bound...: `T: 'a`
+...
 LL |     Box::new(v)
-   |     ^^^^^^^^^^^
-   |
-   = help: consider adding an explicit lifetime bound `T: 'a`...
+   |     ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
 
 error: aborting due to 4 previous errors