summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr
blob: b64cb2c3d0b6a9e7a644890a75e77a225f23ba35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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