@@ -202,68 +202,33 @@ LL | str::from_utf8(concat_bytes!(b"cl", b"\x82ippy"));
202202 | |
203203 | the literal was valid UTF-8 up to the 2 bytes
204204
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-
240205warning: 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
242207 |
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
245210LL | std::str::from_utf8(c);
246211 | ^^^^^^^^^^^^^^^^^^^^^^
247212
248213warning: 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
250215 |
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
253218...
254219LL | str::from_utf8(c);
255220 | ^^^^^^^^^^^^^^^^^
256221
257222warning: 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
259224 |
260225LL | const INVALID_1: [u8; 7] = [99, 108, 130, 105, 112, 112, 121];
261226 | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
262227LL | std::str::from_utf8(&INVALID_1);
263228 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
264229
265230warning: 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
267232 |
268233LL | const INVALID_1: [u8; 7] = [99, 108, 130, 105, 112, 112, 121];
269234 | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
@@ -272,15 +237,15 @@ LL | str::from_utf8(&INVALID_1);
272237 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
273238
274239warning: 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
276241 |
277242LL | static INVALID_2: [u8; 7] = [99, 108, 130, 105, 112, 112, 121];
278243 | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
279244LL | std::str::from_utf8(&INVALID_2);
280245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281246
282247warning: 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
284249 |
285250LL | static INVALID_2: [u8; 7] = [99, 108, 130, 105, 112, 112, 121];
286251 | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
@@ -289,15 +254,15 @@ LL | str::from_utf8(&INVALID_2);
289254 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
290255
291256warning: 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
293258 |
294259LL | const INVALID_3: &'static [u8; 7] = &[99, 108, 130, 105, 112, 112, 121];
295260 | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
296261LL | std::str::from_utf8(INVALID_3);
297262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298263
299264warning: 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
301266 |
302267LL | const INVALID_3: &'static [u8; 7] = &[99, 108, 130, 105, 112, 112, 121];
303268 | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
@@ -306,21 +271,21 @@ LL | str::from_utf8(INVALID_3);
306271 | ^^^^^^^^^^^^^^^^^^^^^^^^^
307272
308273warning: 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
310275 |
311276LL | const INVALID_4: &'static [u8; 7] = { &[99, 108, 130, 105, 112, 112, 121] };
312277 | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
313278LL | std::str::from_utf8(INVALID_4);
314279 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
315280
316281warning: 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
318283 |
319284LL | const INVALID_4: &'static [u8; 7] = { &[99, 108, 130, 105, 112, 112, 121] };
320285 | ---------------------------------- the literal was valid UTF-8 up to the 2 bytes
321286...
322287LL | str::from_utf8(INVALID_4);
323288 | ^^^^^^^^^^^^^^^^^^^^^^^^^
324289
325- warning: 38 warnings emitted
290+ warning: 34 warnings emitted
326291
0 commit comments