diff options
Diffstat (limited to 'src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr')
-rw-r--r-- | src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr new file mode 100644 index 000000000..b64cb2c3d --- /dev/null +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr @@ -0,0 +1,15 @@ +error: lifetime may not live long enough + --> $DIR/project-fn-ret-invariant.rs:52:5 + | +LL | fn baz<'a, 'b>(x: Type<'a>) -> Type<'static> { + | -- lifetime `'a` defined here +... +LL | bar(foo, x) + | ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + | + = note: requirement occurs because of the type `Type<'_>`, which makes the generic argument `'_` invariant + = note: the struct `Type<'a>` is invariant over the parameter `'a` + = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance + +error: aborting due to previous error + |