@@ -22,71 +22,101 @@ error: useless conversion to the same type: `i32`
2222LL | let _: i32 = 0i32.into();
2323 | ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`
2424
25+ error: useless conversion to the same type: `std::str::Lines<'_>`
26+ --> $DIR/useless_conversion.rs:45:22
27+ |
28+ LL | if Some("ok") == lines.into_iter().next() {}
29+ | ^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `lines`
30+
31+ error: useless conversion to the same type: `std::str::Lines<'_>`
32+ --> $DIR/useless_conversion.rs:50:21
33+ |
34+ LL | let mut lines = text.lines().into_iter();
35+ | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `text.lines()`
36+
37+ error: useless conversion to the same type: `std::str::Lines<'_>`
38+ --> $DIR/useless_conversion.rs:56:22
39+ |
40+ LL | if Some("ok") == text.lines().into_iter().next() {}
41+ | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `text.lines()`
42+
43+ error: useless conversion to the same type: `std::ops::Range<i32>`
44+ --> $DIR/useless_conversion.rs:62:13
45+ |
46+ LL | let _ = NUMBERS.into_iter().next();
47+ | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `NUMBERS`
48+
49+ error: useless conversion to the same type: `std::ops::Range<i32>`
50+ --> $DIR/useless_conversion.rs:67:17
51+ |
52+ LL | let mut n = NUMBERS.into_iter();
53+ | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `NUMBERS`
54+
2555error: useless conversion to the same type: `std::string::String`
26- --> $DIR/useless_conversion.rs:61 :21
56+ --> $DIR/useless_conversion.rs:128 :21
2757 |
2858LL | let _: String = "foo".to_string().into();
2959 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"foo".to_string()`
3060
3161error: useless conversion to the same type: `std::string::String`
32- --> $DIR/useless_conversion.rs:62 :21
62+ --> $DIR/useless_conversion.rs:129 :21
3363 |
3464LL | let _: String = From::from("foo".to_string());
3565 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `From::from()`: `"foo".to_string()`
3666
3767error: useless conversion to the same type: `std::string::String`
38- --> $DIR/useless_conversion.rs:63 :13
68+ --> $DIR/useless_conversion.rs:130 :13
3969 |
4070LL | let _ = String::from("foo".to_string());
4171 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `"foo".to_string()`
4272
4373error: useless conversion to the same type: `std::string::String`
44- --> $DIR/useless_conversion.rs:64 :13
74+ --> $DIR/useless_conversion.rs:131 :13
4575 |
4676LL | let _ = String::from(format!("A: {:04}", 123));
4777 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("A: {:04}", 123)`
4878
4979error: useless conversion to the same type: `std::str::Lines<'_>`
50- --> $DIR/useless_conversion.rs:65 :13
80+ --> $DIR/useless_conversion.rs:132 :13
5181 |
5282LL | let _ = "".lines().into_iter();
5383 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `"".lines()`
5484
5585error: useless conversion to the same type: `std::vec::IntoIter<i32>`
56- --> $DIR/useless_conversion.rs:66 :13
86+ --> $DIR/useless_conversion.rs:133 :13
5787 |
5888LL | let _ = vec![1, 2, 3].into_iter().into_iter();
5989 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![1, 2, 3].into_iter()`
6090
6191error: useless conversion to the same type: `std::string::String`
62- --> $DIR/useless_conversion.rs:67 :21
92+ --> $DIR/useless_conversion.rs:134 :21
6393 |
6494LL | let _: String = format!("Hello {}", "world").into();
6595 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Hello {}", "world")`
6696
6797error: useless conversion to the same type: `i32`
68- --> $DIR/useless_conversion.rs:72 :13
98+ --> $DIR/useless_conversion.rs:139 :13
6999 |
70100LL | let _ = i32::from(a + b) * 3;
71101 | ^^^^^^^^^^^^^^^^ help: consider removing `i32::from()`: `(a + b)`
72102
73103error: useless conversion to the same type: `Foo<'a'>`
74- --> $DIR/useless_conversion.rs:78 :23
104+ --> $DIR/useless_conversion.rs:145 :23
75105 |
76106LL | let _: Foo<'a'> = s2.into();
77107 | ^^^^^^^^^ help: consider removing `.into()`: `s2`
78108
79109error: useless conversion to the same type: `Foo<'a'>`
80- --> $DIR/useless_conversion.rs:80 :13
110+ --> $DIR/useless_conversion.rs:147 :13
81111 |
82112LL | let _ = Foo::<'a'>::from(s3);
83113 | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `Foo::<'a'>::from()`: `s3`
84114
85115error: useless conversion to the same type: `std::vec::IntoIter<Foo<'a'>>`
86- --> $DIR/useless_conversion.rs:82 :13
116+ --> $DIR/useless_conversion.rs:149 :13
87117 |
88118LL | let _ = vec![s4, s4, s4].into_iter().into_iter();
89119 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![s4, s4, s4].into_iter()`
90120
91- error: aborting due to 14 previous errors
121+ error: aborting due to 19 previous errors
92122
0 commit comments