]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr
Rollup merge of #105567 - TimNN:kcfi16, r=nikic
[rust.git] / src / test / ui / associated-types / cache / project-fn-ret-invariant.transmute.stderr
1 error: lifetime may not live long enough
2   --> $DIR/project-fn-ret-invariant.rs:52:5
3    |
4 LL | fn baz<'a, 'b>(x: Type<'a>) -> Type<'static> {
5    |        -- lifetime `'a` defined here
6 ...
7 LL |     bar(foo, x)
8    |     ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
9    |
10    = note: requirement occurs because of the type `Type<'_>`, which makes the generic argument `'_` invariant
11    = note: the struct `Type<'a>` is invariant over the parameter `'a`
12    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
13
14 error: aborting due to previous error
15