note: No external requirements --> $DIR/return-wrong-bound-region.rs:21:16 | LL | expect_sig(|a, b| b); // ought to return `a` | ^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32 ] error: unsatisfied lifetime constraints --> $DIR/return-wrong-bound-region.rs:21:23 | LL | expect_sig(|a, b| b); // ought to return `a` | - - ^ closure was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` | | | | | has type `&'1 i32` | has type `&'2 i32` note: No external requirements --> $DIR/return-wrong-bound-region.rs:20:1 | LL | / fn test() { LL | | expect_sig(|a, b| b); // ought to return `a` LL | | //~^ ERROR LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ return_wrong_bound_region[317d]::test[0]) with substs [] error: aborting due to previous error