@@ -202,68 +202,33 @@ LL | str::from_utf8(concat_bytes!(b"cl", b"\x82ippy"));
202
202
| |
203
203
| the literal was valid UTF-8 up to the 2 bytes
204
204
205
- warning: calls to `std::str::from_utf8_mut` with an invalid literal always return an error
206
- --> $DIR/invalid_from_utf8.rs:132:5
207
- |
208
- LL | let mut a = [99, 108, 130, 105, 112, 112, 121];
209
- | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
210
- LL | std::str::from_utf8_mut(&mut a);
211
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
212
-
213
- warning: calls to `str::from_utf8_mut` with an invalid literal always return an error
214
- --> $DIR/invalid_from_utf8.rs:134:5
215
- |
216
- LL | let mut a = [99, 108, 130, 105, 112, 112, 121];
217
- | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
218
- ...
219
- LL | str::from_utf8_mut(&mut a);
220
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
221
-
222
- warning: calls to `std::str::from_utf8_mut` with an invalid literal always return an error
223
- --> $DIR/invalid_from_utf8.rs:138:5
224
- |
225
- LL | let mut a = [99, 108, 130, 105, 112, 112, 121];
226
- | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
227
- ...
228
- LL | std::str::from_utf8_mut(c);
229
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
230
-
231
- warning: calls to `str::from_utf8_mut` with an invalid literal always return an error
232
- --> $DIR/invalid_from_utf8.rs:140:5
233
- |
234
- LL | let mut a = [99, 108, 130, 105, 112, 112, 121];
235
- | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
236
- ...
237
- LL | str::from_utf8_mut(c);
238
- | ^^^^^^^^^^^^^^^^^^^^^
239
-
240
205
warning: calls to `std::str::from_utf8` with an invalid literal always return an error
241
- --> $DIR/invalid_from_utf8.rs:143 :5
206
+ --> $DIR/invalid_from_utf8.rs:146 :5
242
207
|
243
- LL | let mut c = &[99, 108, 130, 105, 112, 112, 121];
244
- | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
208
+ LL | let c = &[99, 108, 130, 105, 112, 112, 121];
209
+ | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
245
210
LL | std::str::from_utf8(c);
246
211
| ^^^^^^^^^^^^^^^^^^^^^^
247
212
248
213
warning: calls to `str::from_utf8` with an invalid literal always return an error
249
- --> $DIR/invalid_from_utf8.rs:145 :5
214
+ --> $DIR/invalid_from_utf8.rs:148 :5
250
215
|
251
- LL | let mut c = &[99, 108, 130, 105, 112, 112, 121];
252
- | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
216
+ LL | let c = &[99, 108, 130, 105, 112, 112, 121];
217
+ | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
253
218
...
254
219
LL | str::from_utf8(c);
255
220
| ^^^^^^^^^^^^^^^^^
256
221
257
222
warning: calls to `std::str::from_utf8` with an invalid literal always return an error
258
- --> $DIR/invalid_from_utf8.rs:148 :5
223
+ --> $DIR/invalid_from_utf8.rs:151 :5
259
224
|
260
225
LL | const INVALID_1: [u8; 7] = [99, 108, 130, 105, 112, 112, 121];
261
226
| ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
262
227
LL | std::str::from_utf8(&INVALID_1);
263
228
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
264
229
265
230
warning: calls to `str::from_utf8` with an invalid literal always return an error
266
- --> $DIR/invalid_from_utf8.rs:150 :5
231
+ --> $DIR/invalid_from_utf8.rs:153 :5
267
232
|
268
233
LL | const INVALID_1: [u8; 7] = [99, 108, 130, 105, 112, 112, 121];
269
234
| ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
@@ -272,15 +237,15 @@ LL | str::from_utf8(&INVALID_1);
272
237
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
273
238
274
239
warning: calls to `std::str::from_utf8` with an invalid literal always return an error
275
- --> $DIR/invalid_from_utf8.rs:153 :5
240
+ --> $DIR/invalid_from_utf8.rs:156 :5
276
241
|
277
242
LL | static INVALID_2: [u8; 7] = [99, 108, 130, 105, 112, 112, 121];
278
243
| ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
279
244
LL | std::str::from_utf8(&INVALID_2);
280
245
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281
246
282
247
warning: calls to `str::from_utf8` with an invalid literal always return an error
283
- --> $DIR/invalid_from_utf8.rs:155 :5
248
+ --> $DIR/invalid_from_utf8.rs:158 :5
284
249
|
285
250
LL | static INVALID_2: [u8; 7] = [99, 108, 130, 105, 112, 112, 121];
286
251
| ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
@@ -289,15 +254,15 @@ LL | str::from_utf8(&INVALID_2);
289
254
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
290
255
291
256
warning: calls to `std::str::from_utf8` with an invalid literal always return an error
292
- --> $DIR/invalid_from_utf8.rs:158 :5
257
+ --> $DIR/invalid_from_utf8.rs:161 :5
293
258
|
294
259
LL | const INVALID_3: &'static [u8; 7] = &[99, 108, 130, 105, 112, 112, 121];
295
260
| ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
296
261
LL | std::str::from_utf8(INVALID_3);
297
262
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298
263
299
264
warning: calls to `str::from_utf8` with an invalid literal always return an error
300
- --> $DIR/invalid_from_utf8.rs:160 :5
265
+ --> $DIR/invalid_from_utf8.rs:163 :5
301
266
|
302
267
LL | const INVALID_3: &'static [u8; 7] = &[99, 108, 130, 105, 112, 112, 121];
303
268
| ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
@@ -306,21 +271,21 @@ LL | str::from_utf8(INVALID_3);
306
271
| ^^^^^^^^^^^^^^^^^^^^^^^^^
307
272
308
273
warning: calls to `std::str::from_utf8` with an invalid literal always return an error
309
- --> $DIR/invalid_from_utf8.rs:163 :5
274
+ --> $DIR/invalid_from_utf8.rs:166 :5
310
275
|
311
276
LL | const INVALID_4: &'static [u8; 7] = { &[99, 108, 130, 105, 112, 112, 121] };
312
277
| ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
313
278
LL | std::str::from_utf8(INVALID_4);
314
279
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
315
280
316
281
warning: calls to `str::from_utf8` with an invalid literal always return an error
317
- --> $DIR/invalid_from_utf8.rs:165 :5
282
+ --> $DIR/invalid_from_utf8.rs:168 :5
318
283
|
319
284
LL | const INVALID_4: &'static [u8; 7] = { &[99, 108, 130, 105, 112, 112, 121] };
320
285
| ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
321
286
...
322
287
LL | str::from_utf8(INVALID_4);
323
288
| ^^^^^^^^^^^^^^^^^^^^^^^^^
324
289
325
- warning: 38 warnings emitted
290
+ warning: 34 warnings emitted
326
291
0 commit comments