@@ -7,7 +7,7 @@ LL | let c = async || { println!("{}", *x); };
7
7
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
8
8
LL | outlives::<'a>(c());
9
9
LL | outlives::<'a>(call_once(c));
10
- | ------------ argument requires that `x` is borrowed for `'a`
10
+ | ---------------- ------------ argument requires that `x` is borrowed for `'a`
11
11
...
12
12
LL | }
13
13
| - `x` dropped here while still borrowed
@@ -21,10 +21,10 @@ LL | fn simple<'a>(x: &'a i32) {
21
21
LL | let c = async move || { println!("{}", *x); };
22
22
| - binding `c` declared here
23
23
LL | outlives::<'a>(c());
24
- | ^ --
25
- | |
26
- | borrowed value does not live long enough
27
- | argument requires that `c` is borrowed for `'a`
24
+ | ---------------^- --
25
+ | | |
26
+ | | borrowed value does not live long enough
27
+ | argument requires that `c` is borrowed for `'a`
28
28
LL | outlives::<'a>(call_once(c));
29
29
LL | }
30
30
| - `c` dropped here while still borrowed
@@ -38,7 +38,7 @@ LL | let c = async || { println!("{}", *x.0); };
38
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
39
39
LL | outlives::<'a>(c());
40
40
LL | outlives::<'a>(call_once(c));
41
- | ------------ argument requires that `x` is borrowed for `'a`
41
+ | ---------------- ------------ argument requires that `x` is borrowed for `'a`
42
42
...
43
43
LL | }
44
44
| - `x` dropped here while still borrowed
@@ -52,7 +52,7 @@ LL | let c = async || { println!("{}", *x.0); };
52
52
| ---------------------------------- borrow of `x` occurs here
53
53
LL | outlives::<'a>(c());
54
54
LL | outlives::<'a>(call_once(c));
55
- | ------------ argument requires that `x` is borrowed for `'a`
55
+ | ---------------- ------------ argument requires that `x` is borrowed for `'a`
56
56
LL |
57
57
LL | let c = async move || { println!("{}", *x.0); };
58
58
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move out of `x` occurs here
@@ -66,10 +66,10 @@ LL | fn through_field<'a>(x: S<'a>) {
66
66
LL | let c = async move || { println!("{}", *x.0); };
67
67
| - binding `c` declared here
68
68
LL | outlives::<'a>(c());
69
- | ^ --
70
- | |
71
- | borrowed value does not live long enough
72
- | argument requires that `c` is borrowed for `'a`
69
+ | ---------------^- --
70
+ | | |
71
+ | | borrowed value does not live long enough
72
+ | argument requires that `c` is borrowed for `'a`
73
73
LL | outlives::<'a>(call_once(c));
74
74
LL | }
75
75
| - `c` dropped here while still borrowed
@@ -83,10 +83,10 @@ LL | fn through_field<'a>(x: S<'a>) {
83
83
LL | let c = async move || { println!("{}", *x.0); };
84
84
| - binding `c` declared here
85
85
LL | outlives::<'a>(c());
86
- | ---
87
- | |
88
- | borrow of `c` occurs here
89
- | argument requires that `c` is borrowed for `'a`
86
+ | ---------------- ---
87
+ | | |
88
+ | | borrow of `c` occurs here
89
+ | argument requires that `c` is borrowed for `'a`
90
90
LL | outlives::<'a>(call_once(c));
91
91
| ^ move out of `c` occurs here
92
92
@@ -99,18 +99,18 @@ LL | let c = async || { println!("{}", *x.0); };
99
99
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
100
100
LL | outlives::<'a>(c());
101
101
LL | outlives::<'a>(call_once(c));
102
- | ------------ argument requires that `x` is borrowed for `'a`
102
+ | ---------------- ------------ argument requires that `x` is borrowed for `'a`
103
103
LL | }
104
104
| - `x` dropped here while still borrowed
105
105
106
106
error[E0621]: explicit lifetime required in the type of `x`
107
- --> $DIR/without-precise-captures-we-are-powerless.rs:40:20
107
+ --> $DIR/without-precise-captures-we-are-powerless.rs:40:5
108
108
|
109
109
LL | fn through_field_and_ref<'a>(x: &S<'a>) {
110
110
| ------ help: add explicit lifetime `'a` to the type of `x`: `&'a S<'a>`
111
111
...
112
112
LL | outlives::<'a>(call_once(c));
113
- | ^^^^^^^^^^^^ lifetime `'a` required
113
+ | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ lifetime `'a` required
114
114
115
115
error[E0597]: `c` does not live long enough
116
116
--> $DIR/without-precise-captures-we-are-powerless.rs:45:20
@@ -120,22 +120,22 @@ LL | fn through_field_and_ref_move<'a>(x: &S<'a>) {
120
120
LL | let c = async move || { println!("{}", *x.0); };
121
121
| - binding `c` declared here
122
122
LL | outlives::<'a>(c());
123
- | ^ --
124
- | |
125
- | borrowed value does not live long enough
126
- | argument requires that `c` is borrowed for `'a`
123
+ | ---------------^- --
124
+ | | |
125
+ | | borrowed value does not live long enough
126
+ | argument requires that `c` is borrowed for `'a`
127
127
LL | outlives::<'a>(call_once(c));
128
128
LL | }
129
129
| - `c` dropped here while still borrowed
130
130
131
131
error[E0621]: explicit lifetime required in the type of `x`
132
- --> $DIR/without-precise-captures-we-are-powerless.rs:46:20
132
+ --> $DIR/without-precise-captures-we-are-powerless.rs:46:5
133
133
|
134
134
LL | fn through_field_and_ref_move<'a>(x: &S<'a>) {
135
135
| ------ help: add explicit lifetime `'a` to the type of `x`: `&'a S<'a>`
136
136
...
137
137
LL | outlives::<'a>(call_once(c));
138
- | ^^^^^^^^^^^^ lifetime `'a` required
138
+ | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ lifetime `'a` required
139
139
140
140
error: aborting due to 10 previous errors
141
141
0 commit comments