]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / variance / variance-use-invariant-struct-1.nll.stderr
index 61f80fe77e63de24a62aa562d9b54a4670989a81..385d83adaf830b5898b42c2bc19d41277dd3af94 100644 (file)
@@ -8,6 +8,8 @@ LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
 ...
 LL |     v
    |     ^ returning this value requires that `'min` must outlive `'max`
+   |
+   = help: consider adding the following bound: `'min: 'max`
 
 error: lifetime may not live long enough
   --> $DIR/variance-use-invariant-struct-1.rs:19:5
@@ -19,6 +21,8 @@ LL | fn bar<'min,'max>(v: SomeStruct<&'min ()>)
 ...
 LL |     v
    |     ^ returning this value requires that `'min` must outlive `'max`
+   |
+   = help: consider adding the following bound: `'min: 'max`
 
 error: aborting due to 2 previous errors