]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/regions/regions-close-object-into-object-5.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / regions / regions-close-object-into-object-5.stderr
index 01975d40fdf1f4b0c3b292deb99aa8209a87223f..5b692cdcc0ecc77ebc6444265cb2730e7b9c092a 100644 (file)
@@ -1,92 +1,62 @@
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-object-into-object-5.rs:17:5
    |
-LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
-   |          - help: consider adding an explicit lifetime bound `T: 'static`...
+LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
+   |          - help: consider adding an explicit lifetime bound...: `T: 'static`
 LL |     // oh dear!
 LL |     box B(&*v) as Box<X>
-   |     ^^^^^^^^^^
-   |
-note: ...so that the type `B<'_, T>` will meet its required lifetime bounds
-  --> $DIR/regions-close-object-into-object-5.rs:17:5
-   |
-LL |     box B(&*v) as Box<X>
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ ...so that the type `B<'_, T>` will meet its required lifetime bounds
 
 error[E0310]: the parameter type `T` may not live long enough
-  --> $DIR/regions-close-object-into-object-5.rs:17:5
+  --> $DIR/regions-close-object-into-object-5.rs:17:9
    |
-LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
-   |          - help: consider adding an explicit lifetime bound `T: 'static`...
+LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
+   |          - help: consider adding an explicit lifetime bound...: `T: 'static`
 LL |     // oh dear!
 LL |     box B(&*v) as Box<X>
-   |     ^^^^^^^^^^^^^^^^^^^^
-   |
-note: ...so that it can be closed over into an object
-  --> $DIR/regions-close-object-into-object-5.rs:17:5
-   |
-LL |     box B(&*v) as Box<X>
-   |     ^^^^^^^^^^^^^^^^^^^^
+   |         ^ ...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-object-into-object-5.rs:17:9
    |
-LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
-   |          - help: consider adding an explicit lifetime bound `T: 'static`...
+LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
+   |          - help: consider adding an explicit lifetime bound...: `T: 'static`
 LL |     // oh dear!
 LL |     box B(&*v) as Box<X>
-   |         ^
+   |         ^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
    |
-note: ...so that the type `T` will meet its required lifetime bounds
-  --> $DIR/regions-close-object-into-object-5.rs:17:9
+note: ...that is required by this bound
+  --> $DIR/regions-close-object-into-object-5.rs:9:17
    |
-LL |     box B(&*v) as Box<X>
-   |         ^
+LL | struct B<'a, T: 'a>(&'a (A<T> + 'a));
+   |                 ^^
 
 error[E0310]: the parameter type `T` may not live long enough
-  --> $DIR/regions-close-object-into-object-5.rs:17:9
+  --> $DIR/regions-close-object-into-object-5.rs:17:11
    |
-LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
-   |          - help: consider adding an explicit lifetime bound `T: 'static`...
+LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
+   |          - help: consider adding an explicit lifetime bound...: `T: 'static`
 LL |     // oh dear!
 LL |     box B(&*v) as Box<X>
-   |         ^^^^^^
-   |
-note: ...so that the type `T` will meet its required lifetime bounds
-  --> $DIR/regions-close-object-into-object-5.rs:17:9
-   |
-LL |     box B(&*v) as Box<X>
-   |         ^^^^^^
+   |           ^^^ ...so that the reference type `&dyn A<T>` does not outlive the data it points at
 
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-object-into-object-5.rs:17:11
    |
-LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
-   |          - help: consider adding an explicit lifetime bound `T: 'static`...
+LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
+   |          - help: consider adding an explicit lifetime bound...: `T: 'static`
 LL |     // oh dear!
 LL |     box B(&*v) as Box<X>
-   |           ^^^
-   |
-note: ...so that the reference type `&dyn A<T>` does not outlive the data it points at
-  --> $DIR/regions-close-object-into-object-5.rs:17:11
-   |
-LL |     box B(&*v) as Box<X>
-   |           ^^^
+   |           ^^^ ...so that the type `(dyn A<T> + 'static)` is not borrowed for too long
 
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-object-into-object-5.rs:17:11
    |
-LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
-   |          - help: consider adding an explicit lifetime bound `T: 'static`...
+LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
+   |          - help: consider adding an explicit lifetime bound...: `T: 'static`
 LL |     // oh dear!
 LL |     box B(&*v) as Box<X>
-   |           ^^^
-   |
-note: ...so that the type `(dyn A<T> + 'static)` is not borrowed for too long
-  --> $DIR/regions-close-object-into-object-5.rs:17:11
-   |
-LL |     box B(&*v) as Box<X>
-   |           ^^^
+   |           ^^^ ...so that the type `(dyn A<T> + 'static)` is not borrowed for too long
 
 error: aborting due to 6 previous errors