Matthew Maurer | 859223d | 2020-03-27 12:47:38 -0700 | [diff] [blame] | 1 | note: no external requirements |
Inna Palant | ff3f07a | 2019-07-11 16:15:26 -0700 | [diff] [blame] | 2 | --> $DIR/escape-argument-callee.rs:26:38 |
| 3 | | |
| 4 | LL | let mut closure = expect_sig(|p, y| *p = y); |
Charisee | b1d3280 | 2022-09-22 15:38:41 +0000 | [diff] [blame^] | 5 | | ^^^^^^ |
Inna Palant | ff3f07a | 2019-07-11 16:15:26 -0700 | [diff] [blame] | 6 | | |
ThiƩbaud Weksteen | 3b664ca | 2020-11-26 14:41:59 +0100 | [diff] [blame] | 7 | = note: defining type: test::{closure#0} with closure substs [ |
Inna Palant | ff3f07a | 2019-07-11 16:15:26 -0700 | [diff] [blame] | 8 | i16, |
Chris Wailes | 32f7835 | 2021-07-20 14:04:55 -0700 | [diff] [blame] | 9 | for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t0) }) i32)), |
Jeff Vander Stoep | ad6790c | 2020-06-24 15:34:31 +0200 | [diff] [blame] | 10 | (), |
Inna Palant | ff3f07a | 2019-07-11 16:15:26 -0700 | [diff] [blame] | 11 | ] |
| 12 | |
| 13 | error: lifetime may not live long enough |
| 14 | --> $DIR/escape-argument-callee.rs:26:45 |
| 15 | | |
| 16 | LL | let mut closure = expect_sig(|p, y| *p = y); |
| 17 | | - - ^^^^^^ assignment requires that `'1` must outlive `'2` |
| 18 | | | | |
| 19 | | | has type `&'1 i32` |
| 20 | | has type `&'_#2r mut &'2 i32` |
| 21 | |
Matthew Maurer | 859223d | 2020-03-27 12:47:38 -0700 | [diff] [blame] | 22 | note: no external requirements |
Inna Palant | ff3f07a | 2019-07-11 16:15:26 -0700 | [diff] [blame] | 23 | --> $DIR/escape-argument-callee.rs:20:1 |
| 24 | | |
| 25 | LL | / fn test() { |
| 26 | LL | | let x = 44; |
| 27 | LL | | let mut p = &x; |
| 28 | LL | | |
| 29 | ... | |
| 30 | LL | | deref(p); |
| 31 | LL | | } |
| 32 | | |_^ |
| 33 | | |
Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 34 | = note: defining type: test |
Inna Palant | ff3f07a | 2019-07-11 16:15:26 -0700 | [diff] [blame] | 35 | |
| 36 | error: aborting due to previous error |
| 37 | |