]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr
Change NLL compare mode to borrowck=migrate.
[rust.git] / src / test / ui / associated-types / cache / project-fn-ret-contravariant.transmute.nll.stderr
1 error: unsatisfied lifetime constraints
2   --> $DIR/project-fn-ret-contravariant.rs:48:4
3    |
4 LL | fn baz<'a,'b>(x: &'a u32) -> &'static u32 {
5    |        -- lifetime `'a` defined here
6 LL |    bar(foo, x) //[transmute]~ ERROR E0495
7    |    ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
8
9 error: unsatisfied lifetime constraints
10   --> $DIR/project-fn-ret-contravariant.rs:48:4
11    |
12 LL | fn baz<'a,'b>(x: &'a u32) -> &'static u32 {
13    |        -- -- lifetime `'b` defined here
14    |        |
15    |        lifetime `'a` defined here
16 LL |    bar(foo, x) //[transmute]~ ERROR E0495
17    |    ^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
18
19 error: aborting due to 2 previous errors
20