blob: f86a19fff8458b6734b23159673f6d795781a827 [file] [log] [blame]
Matthew Maurer859223d2020-03-27 12:47:38 -07001note: no external requirements
Inna Palantff3f07a2019-07-11 16:15:26 -07002 --> $DIR/escape-argument-callee.rs:26:38
3 |
4LL | let mut closure = expect_sig(|p, y| *p = y);
Chariseeb1d32802022-09-22 15:38:41 +00005 | ^^^^^^
Inna Palantff3f07a2019-07-11 16:15:26 -07006 |
ThiƩbaud Weksteen3b664ca2020-11-26 14:41:59 +01007 = note: defining type: test::{closure#0} with closure substs [
Inna Palantff3f07a2019-07-11 16:15:26 -07008 i16,
Chris Wailes32f78352021-07-20 14:04:55 -07009 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 Stoepad6790c2020-06-24 15:34:31 +020010 (),
Inna Palantff3f07a2019-07-11 16:15:26 -070011 ]
12
13error: lifetime may not live long enough
14 --> $DIR/escape-argument-callee.rs:26:45
15 |
16LL | 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 Maurer859223d2020-03-27 12:47:38 -070022note: no external requirements
Inna Palantff3f07a2019-07-11 16:15:26 -070023 --> $DIR/escape-argument-callee.rs:20:1
24 |
25LL | / fn test() {
26LL | | let x = 44;
27LL | | let mut p = &x;
28LL | |
29... |
30LL | | deref(p);
31LL | | }
32 | |_^
33 |
Matthew Maurerf4d8f812020-03-27 13:14:30 -070034 = note: defining type: test
Inna Palantff3f07a2019-07-11 16:15:26 -070035
36error: aborting due to previous error
37