@@ -25,37 +25,25 @@ LL | require_os_str(&OsString::from("x").to_os_string());
2525 | ^^^^^^^^^^^^^^^^^^^
2626
2727error: redundant clone
28- --> tests/ui/unnecessary_to_owned.rs:222:48
29- |
30- LL | require_path(&std::path::PathBuf::from("x").to_path_buf());
31- | ^^^^^^^^^^^^^^ help: remove this
32- |
33- note: this value is dropped without further use
34- --> tests/ui/unnecessary_to_owned.rs:222:19
35- |
36- LL | require_path(&std::path::PathBuf::from("x").to_path_buf());
37- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38-
39- error: redundant clone
40- --> tests/ui/unnecessary_to_owned.rs:224:35
28+ --> tests/ui/unnecessary_to_owned.rs:222:35
4129 |
4230LL | require_str(&String::from("x").to_string());
4331 | ^^^^^^^^^^^^ help: remove this
4432 |
4533note: this value is dropped without further use
46- --> tests/ui/unnecessary_to_owned.rs:224 :18
34+ --> tests/ui/unnecessary_to_owned.rs:222 :18
4735 |
4836LL | require_str(&String::from("x").to_string());
4937 | ^^^^^^^^^^^^^^^^^
5038
5139error: redundant clone
52- --> tests/ui/unnecessary_to_owned.rs:226 :39
40+ --> tests/ui/unnecessary_to_owned.rs:224 :39
5341 |
5442LL | require_slice(&[String::from("x")].to_owned());
5543 | ^^^^^^^^^^^ help: remove this
5644 |
5745note: this value is dropped without further use
58- --> tests/ui/unnecessary_to_owned.rs:226 :20
46+ --> tests/ui/unnecessary_to_owned.rs:224 :20
5947 |
6048LL | require_slice(&[String::from("x")].to_owned());
6149 | ^^^^^^^^^^^^^^^^^^^
@@ -454,7 +442,7 @@ LL | let _ = IntoIterator::into_iter(slice.to_owned());
454442 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
455443
456444error: allocating a new `String` only to create a temporary `&str` from it
457- --> tests/ui/unnecessary_to_owned.rs:230 :26
445+ --> tests/ui/unnecessary_to_owned.rs:228 :26
458446 |
459447LL | let _ref_str: &str = &String::from_utf8(slice.to_vec()).expect("not UTF-8");
460448 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -466,7 +454,7 @@ LL + let _ref_str: &str = core::str::from_utf8(&slice).expect("not UTF-8");
466454 |
467455
468456error: allocating a new `String` only to create a temporary `&str` from it
469- --> tests/ui/unnecessary_to_owned.rs:232 :26
457+ --> tests/ui/unnecessary_to_owned.rs:230 :26
470458 |
471459LL | let _ref_str: &str = &String::from_utf8(b"foo".to_vec()).unwrap();
472460 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -478,7 +466,7 @@ LL + let _ref_str: &str = core::str::from_utf8(b"foo").unwrap();
478466 |
479467
480468error: allocating a new `String` only to create a temporary `&str` from it
481- --> tests/ui/unnecessary_to_owned.rs:234 :26
469+ --> tests/ui/unnecessary_to_owned.rs:232 :26
482470 |
483471LL | let _ref_str: &str = &String::from_utf8(b"foo".as_slice().to_owned()).unwrap();
484472 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -490,7 +478,7 @@ LL + let _ref_str: &str = core::str::from_utf8(b"foo".as_slice()).unwrap();
490478 |
491479
492480error: unnecessary use of `to_vec`
493- --> tests/ui/unnecessary_to_owned.rs:292 :14
481+ --> tests/ui/unnecessary_to_owned.rs:290 :14
494482 |
495483LL | for t in file_types.to_vec() {
496484 | ^^^^^^^^^^^^^^^^^^^
@@ -503,52 +491,52 @@ LL ~ let path = match get_file_path(t) {
503491 |
504492
505493error: unnecessary use of `to_string`
506- --> tests/ui/unnecessary_to_owned.rs:358 :24
494+ --> tests/ui/unnecessary_to_owned.rs:356 :24
507495 |
508496LL | Box::new(build(y.to_string()))
509497 | ^^^^^^^^^^^^^ help: use: `y`
510498
511499error: unnecessary use of `to_string`
512- --> tests/ui/unnecessary_to_owned.rs:468 :12
500+ --> tests/ui/unnecessary_to_owned.rs:466 :12
513501 |
514502LL | id("abc".to_string())
515503 | ^^^^^^^^^^^^^^^^^ help: use: `"abc"`
516504
517505error: unnecessary use of `to_vec`
518- --> tests/ui/unnecessary_to_owned.rs:612 :37
506+ --> tests/ui/unnecessary_to_owned.rs:610 :37
519507 |
520508LL | IntoFuture::into_future(foo([].to_vec(), &0));
521509 | ^^^^^^^^^^^ help: use: `[]`
522510
523511error: unnecessary use of `to_vec`
524- --> tests/ui/unnecessary_to_owned.rs:623 :18
512+ --> tests/ui/unnecessary_to_owned.rs:621 :18
525513 |
526514LL | s.remove(&a.to_vec());
527515 | ^^^^^^^^^^^ help: replace it with: `a`
528516
529517error: unnecessary use of `to_owned`
530- --> tests/ui/unnecessary_to_owned.rs:628 :14
518+ --> tests/ui/unnecessary_to_owned.rs:626 :14
531519 |
532520LL | s.remove(&"b".to_owned());
533521 | ^^^^^^^^^^^^^^^ help: replace it with: `"b"`
534522
535523error: unnecessary use of `to_string`
536- --> tests/ui/unnecessary_to_owned.rs:630 :14
524+ --> tests/ui/unnecessary_to_owned.rs:628 :14
537525 |
538526LL | s.remove(&"b".to_string());
539527 | ^^^^^^^^^^^^^^^^ help: replace it with: `"b"`
540528
541529error: unnecessary use of `to_vec`
542- --> tests/ui/unnecessary_to_owned.rs:636 :14
530+ --> tests/ui/unnecessary_to_owned.rs:634 :14
543531 |
544532LL | s.remove(&["b"].to_vec());
545533 | ^^^^^^^^^^^^^^^ help: replace it with: `["b"].as_slice()`
546534
547535error: unnecessary use of `to_vec`
548- --> tests/ui/unnecessary_to_owned.rs:638 :14
536+ --> tests/ui/unnecessary_to_owned.rs:636 :14
549537 |
550538LL | s.remove(&(&["b"]).to_vec());
551539 | ^^^^^^^^^^^^^^^^^^ help: replace it with: `(&["b"]).as_slice()`
552540
553- error: aborting due to 82 previous errors
541+ error: aborting due to 81 previous errors
554542
0 commit comments