]>
Commit | Line | Data |
---|---|---|
dfeec247 | 1 | note: no external requirements |
0731742a | 2 | --> $DIR/return-wrong-bound-region.rs:11:16 |
ff7c6d11 | 3 | | |
0531ce1d | 4 | LL | expect_sig(|a, b| b); // ought to return `a` |
ff7c6d11 XL |
5 | | ^^^^^^^^ |
6 | | | |
1b1a35ee | 7 | = note: defining type: test::{closure#0} with closure substs [ |
ff7c6d11 | 8 | i16, |
cdc7bbd5 | 9 | for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) i32)) -> &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) i32, |
ba9703b0 | 10 | (), |
ff7c6d11 XL |
11 | ] |
12 | ||
9fa01778 | 13 | error: lifetime may not live long enough |
0731742a | 14 | --> $DIR/return-wrong-bound-region.rs:11:23 |
b7449926 XL |
15 | | |
16 | LL | expect_sig(|a, b| b); // ought to return `a` | |
17 | | - - ^ closure was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` | |
18 | | | | | |
19 | | | has type `&'1 i32` | |
20 | | has type `&'2 i32` | |
21 | ||
dfeec247 | 22 | note: no external requirements |
0731742a | 23 | --> $DIR/return-wrong-bound-region.rs:10:1 |
ff7c6d11 | 24 | | |
0531ce1d XL |
25 | LL | / fn test() { |
26 | LL | | expect_sig(|a, b| b); // ought to return `a` | |
532ac7d7 | 27 | LL | | |
0531ce1d | 28 | LL | | } |
ff7c6d11 XL |
29 | | |_^ |
30 | | | |
60c5eb7d | 31 | = note: defining type: test |
ff7c6d11 XL |
32 | |
33 | error: aborting due to previous error | |
34 |