]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-infer-not-param.nll.stderr
Change NLL compare mode to borrowck=migrate.
[rust.git] / src / test / ui / regions / regions-infer-not-param.nll.stderr
1 error: unsatisfied lifetime constraints
2   --> $DIR/regions-infer-not-param.rs:25:54
3    |
4 LL | fn take_direct<'a,'b>(p: direct<'a>) -> direct<'b> { p } //~ ERROR mismatched types
5    |                -- -- lifetime `'b` defined here      ^ returning this value requires that `'a` must outlive `'b`
6    |                |
7    |                lifetime `'a` defined here
8
9 error: unsatisfied lifetime constraints
10   --> $DIR/regions-infer-not-param.rs:29:63
11    |
12 LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
13    |                   -- -- lifetime `'b` defined here            ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
14    |                   |
15    |                   lifetime `'a` defined here
16
17 error: unsatisfied lifetime constraints
18   --> $DIR/regions-infer-not-param.rs:29:63
19    |
20 LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
21    |                   -- -- lifetime `'b` defined here            ^ returning this value requires that `'a` must outlive `'b`
22    |                   |
23    |                   lifetime `'a` defined here
24
25 error: aborting due to 3 previous errors
26