@@ -52,24 +52,51 @@ note: the anonymous lifetime #3 defined on the function body at 19:1...
52
52
|
53
53
LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
54
54
LL | | *ap0 = ap1;
55
+ LL | |
55
56
LL | | }
56
57
| |_^
57
58
note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 19:1
58
59
--> $DIR/variadic-ffi-4.rs:19:1
59
60
|
60
61
LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
61
62
LL | | *ap0 = ap1;
63
+ LL | |
64
+ LL | | }
65
+ | |_^
66
+
67
+ error[E0308]: mismatched types
68
+ --> $DIR/variadic-ffi-4.rs:20:12
69
+ |
70
+ LL | *ap0 = ap1;
71
+ | ^^^ lifetime mismatch
72
+ |
73
+ = note: expected type `core::ffi::VaListImpl<'_>`
74
+ found type `core::ffi::VaListImpl<'_>`
75
+ note: the anonymous lifetime #2 defined on the function body at 19:1...
76
+ --> $DIR/variadic-ffi-4.rs:19:1
77
+ |
78
+ LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
79
+ LL | | *ap0 = ap1;
80
+ LL | |
81
+ LL | | }
82
+ | |_^
83
+ note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 19:1
84
+ --> $DIR/variadic-ffi-4.rs:19:1
85
+ |
86
+ LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
87
+ LL | | *ap0 = ap1;
88
+ LL | |
62
89
LL | | }
63
90
| |_^
64
91
65
92
error[E0490]: a value of type `core::ffi::VaListImpl<'_>` is borrowed for too long
66
- --> $DIR/variadic-ffi-4.rs:24 :11
93
+ --> $DIR/variadic-ffi-4.rs:25 :11
67
94
|
68
95
LL | ap0 = &mut ap1;
69
96
| ^^^^^^^^
70
97
|
71
- note: the type is valid for the anonymous lifetime #1 defined on the function body at 23 :1
72
- --> $DIR/variadic-ffi-4.rs:23 :1
98
+ note: the type is valid for the anonymous lifetime #1 defined on the function body at 24 :1
99
+ --> $DIR/variadic-ffi-4.rs:24 :1
73
100
|
74
101
LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
75
102
LL | | ap0 = &mut ap1;
@@ -79,8 +106,8 @@ LL | |
79
106
LL | |
80
107
LL | | }
81
108
| |_^
82
- note: but the borrow lasts for the anonymous lifetime #3 defined on the function body at 23 :1
83
- --> $DIR/variadic-ffi-4.rs:23 :1
109
+ note: but the borrow lasts for the anonymous lifetime #3 defined on the function body at 24 :1
110
+ --> $DIR/variadic-ffi-4.rs:24 :1
84
111
|
85
112
LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
86
113
LL | | ap0 = &mut ap1;
@@ -92,15 +119,15 @@ LL | | }
92
119
| |_^
93
120
94
121
error[E0308]: mismatched types
95
- --> $DIR/variadic-ffi-4.rs:24 :11
122
+ --> $DIR/variadic-ffi-4.rs:25 :11
96
123
|
97
124
LL | ap0 = &mut ap1;
98
125
| ^^^^^^^^ lifetime mismatch
99
126
|
100
127
= note: expected type `&mut core::ffi::VaListImpl<'_>`
101
128
found type `&mut core::ffi::VaListImpl<'_>`
102
- note: the anonymous lifetime #3 defined on the function body at 23 :1...
103
- --> $DIR/variadic-ffi-4.rs:23 :1
129
+ note: the anonymous lifetime #3 defined on the function body at 24 :1...
130
+ --> $DIR/variadic-ffi-4.rs:24 :1
104
131
|
105
132
LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
106
133
LL | | ap0 = &mut ap1;
@@ -110,8 +137,8 @@ LL | |
110
137
LL | |
111
138
LL | | }
112
139
| |_^
113
- note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 23 :1
114
- --> $DIR/variadic-ffi-4.rs:23 :1
140
+ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 24 :1
141
+ --> $DIR/variadic-ffi-4.rs:24 :1
115
142
|
116
143
LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
117
144
LL | | ap0 = &mut ap1;
@@ -123,15 +150,15 @@ LL | | }
123
150
| |_^
124
151
125
152
error[E0308]: mismatched types
126
- --> $DIR/variadic-ffi-4.rs:24 :11
153
+ --> $DIR/variadic-ffi-4.rs:25 :11
127
154
|
128
155
LL | ap0 = &mut ap1;
129
156
| ^^^^^^^^ lifetime mismatch
130
157
|
131
158
= note: expected type `&mut core::ffi::VaListImpl<'_>`
132
159
found type `&mut core::ffi::VaListImpl<'_>`
133
- note: the anonymous lifetime #2 defined on the function body at 23 :1...
134
- --> $DIR/variadic-ffi-4.rs:23 :1
160
+ note: the anonymous lifetime #2 defined on the function body at 24 :1...
161
+ --> $DIR/variadic-ffi-4.rs:24 :1
135
162
|
136
163
LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
137
164
LL | | ap0 = &mut ap1;
@@ -141,8 +168,8 @@ LL | |
141
168
LL | |
142
169
LL | | }
143
170
| |_^
144
- note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 23 :1
145
- --> $DIR/variadic-ffi-4.rs:23 :1
171
+ note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 24 :1
172
+ --> $DIR/variadic-ffi-4.rs:24 :1
146
173
|
147
174
LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
148
175
LL | | ap0 = &mut ap1;
@@ -154,13 +181,13 @@ LL | | }
154
181
| |_^
155
182
156
183
error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
157
- --> $DIR/variadic-ffi-4.rs:24 :11
184
+ --> $DIR/variadic-ffi-4.rs:25 :11
158
185
|
159
186
LL | ap0 = &mut ap1;
160
187
| ^^^^^^^^
161
188
|
162
- note: first, the lifetime cannot outlive the anonymous lifetime #3 defined on the function body at 23 :1...
163
- --> $DIR/variadic-ffi-4.rs:23 :1
189
+ note: first, the lifetime cannot outlive the anonymous lifetime #3 defined on the function body at 24 :1...
190
+ --> $DIR/variadic-ffi-4.rs:24 :1
164
191
|
165
192
LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
166
193
LL | | ap0 = &mut ap1;
@@ -171,12 +198,12 @@ LL | |
171
198
LL | | }
172
199
| |_^
173
200
note: ...so that the type `core::ffi::VaListImpl<'_>` is not borrowed for too long
174
- --> $DIR/variadic-ffi-4.rs:24 :11
201
+ --> $DIR/variadic-ffi-4.rs:25 :11
175
202
|
176
203
LL | ap0 = &mut ap1;
177
204
| ^^^^^^^^
178
- note: but, the lifetime must be valid for the anonymous lifetime #1 defined on the function body at 23 :1...
179
- --> $DIR/variadic-ffi-4.rs:23 :1
205
+ note: but, the lifetime must be valid for the anonymous lifetime #1 defined on the function body at 24 :1...
206
+ --> $DIR/variadic-ffi-4.rs:24 :1
180
207
|
181
208
LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
182
209
LL | | ap0 = &mut ap1;
@@ -187,39 +214,62 @@ LL | |
187
214
LL | | }
188
215
| |_^
189
216
note: ...so that reference does not outlive borrowed content
190
- --> $DIR/variadic-ffi-4.rs:24 :11
217
+ --> $DIR/variadic-ffi-4.rs:25 :11
191
218
|
192
219
LL | ap0 = &mut ap1;
193
220
| ^^^^^^^^
194
221
195
- error[E0495 ]: cannot infer an appropriate lifetime due to conflicting requirements
196
- --> $DIR/variadic-ffi-4.rs:32:16
222
+ error[E0308 ]: mismatched types
223
+ --> $DIR/variadic-ffi-4.rs:33:12
197
224
|
198
225
LL | *ap0 = ap1.clone();
199
- | ^^^^^
226
+ | ^^^^^^^^^^^ lifetime mismatch
200
227
|
201
- note: first, the lifetime cannot outlive the anonymous lifetime #3 defined on the function body at 31:1...
202
- --> $DIR/variadic-ffi-4.rs:31:1
228
+ = note: expected type `core::ffi::VaListImpl<'_>`
229
+ found type `core::ffi::VaListImpl<'_>`
230
+ note: the anonymous lifetime #3 defined on the function body at 32:1...
231
+ --> $DIR/variadic-ffi-4.rs:32:1
203
232
|
204
233
LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
205
234
LL | | *ap0 = ap1.clone();
235
+ LL | |
206
236
LL | | }
207
237
| |_^
208
- = note: ...so that the types are compatible:
209
- expected &core::ffi::VaListImpl<'_>
210
- found &core::ffi::VaListImpl<'_>
211
- note: but, the lifetime must be valid for the anonymous lifetime #2 defined on the function body at 31:1...
212
- --> $DIR/variadic-ffi-4.rs:31:1
238
+ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 32:1
239
+ --> $DIR/variadic-ffi-4.rs:32:1
213
240
|
214
241
LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
215
242
LL | | *ap0 = ap1.clone();
243
+ LL | |
244
+ LL | | }
245
+ | |_^
246
+
247
+ error[E0308]: mismatched types
248
+ --> $DIR/variadic-ffi-4.rs:33:12
249
+ |
250
+ LL | *ap0 = ap1.clone();
251
+ | ^^^^^^^^^^^ lifetime mismatch
252
+ |
253
+ = note: expected type `core::ffi::VaListImpl<'_>`
254
+ found type `core::ffi::VaListImpl<'_>`
255
+ note: the anonymous lifetime #2 defined on the function body at 32:1...
256
+ --> $DIR/variadic-ffi-4.rs:32:1
257
+ |
258
+ LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
259
+ LL | | *ap0 = ap1.clone();
260
+ LL | |
261
+ LL | | }
262
+ | |_^
263
+ note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 32:1
264
+ --> $DIR/variadic-ffi-4.rs:32:1
265
+ |
266
+ LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
267
+ LL | | *ap0 = ap1.clone();
268
+ LL | |
216
269
LL | | }
217
270
| |_^
218
- = note: ...so that the expression is assignable:
219
- expected core::ffi::VaListImpl<'_>
220
- found core::ffi::VaListImpl<'_>
221
271
222
- error: aborting due to 9 previous errors
272
+ error: aborting due to 11 previous errors
223
273
224
274
Some errors have detailed explanations: E0308, E0621.
225
275
For more information about an error, try `rustc --explain E0308`.
0 commit comments