]>
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` |
064997fb | 5 | | ^^^^^^ |
ff7c6d11 | 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 | | |
f2b60f7d FG |
25 | LL | fn test() { |
26 | | ^^^^^^^^^ | |
ff7c6d11 | 27 | | |
60c5eb7d | 28 | = note: defining type: test |
ff7c6d11 XL |
29 | |
30 | error: aborting due to previous error | |
31 |