]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/variance/variance-covariant-arg-object.nll.stderr
More nll revisions
[rust.git] / src / test / ui / variance / variance-covariant-arg-object.nll.stderr
index 37fdea960be7ca2703c7680397537a65fae83ed2..1b2ec61825f8f75001f799c946996464bd1d3c13 100644 (file)
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/variance-covariant-arg-object.rs:15:5
+  --> $DIR/variance-covariant-arg-object.rs:19:5
    |
 LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                     ----  ---- lifetime `'max` defined here
@@ -7,12 +7,12 @@ LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                     lifetime `'min` defined here
 ...
 LL |     v
-   |     ^ returning this value requires that `'min` must outlive `'max`
+   |     ^ function was supposed to return data with lifetime `'max` but it is returning data with lifetime `'min`
    |
    = help: consider adding the following bound: `'min: 'max`
 
 error: lifetime may not live long enough
-  --> $DIR/variance-covariant-arg-object.rs:22:5
+  --> $DIR/variance-covariant-arg-object.rs:28:5
    |
 LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                     ----  ---- lifetime `'max` defined here
@@ -20,7 +20,7 @@ LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                     lifetime `'min` defined here
 ...
 LL |     v
-   |     ^ returning this value requires that `'min` must outlive `'max`
+   |     ^ function was supposed to return data with lifetime `'max` but it is returning data with lifetime `'min`
    |
    = help: consider adding the following bound: `'min: 'max`