1 error: useless conversion to the same type: `T`
2 --> $DIR/useless_conversion.rs:7:13
4 LL | let _ = T::from(val);
5 | ^^^^^^^^^^^^ help: consider removing `T::from()`: `val`
7 note: the lint level is defined here
8 --> $DIR/useless_conversion.rs:3:9
10 LL | #![deny(clippy::useless_conversion)]
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
13 error: useless conversion to the same type: `T`
14 --> $DIR/useless_conversion.rs:8:5
17 | ^^^^^^^^^^ help: consider removing `.into()`: `val`
19 error: useless conversion to the same type: `i32`
20 --> $DIR/useless_conversion.rs:20:22
22 LL | let _: i32 = 0i32.into();
23 | ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`
25 error: useless conversion to the same type: `std::string::String`
26 --> $DIR/useless_conversion.rs:61:21
28 LL | let _: String = "foo".to_string().into();
29 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"foo".to_string()`
31 error: useless conversion to the same type: `std::string::String`
32 --> $DIR/useless_conversion.rs:62:21
34 LL | let _: String = From::from("foo".to_string());
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `From::from()`: `"foo".to_string()`
37 error: useless conversion to the same type: `std::string::String`
38 --> $DIR/useless_conversion.rs:63:13
40 LL | let _ = String::from("foo".to_string());
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `"foo".to_string()`
43 error: useless conversion to the same type: `std::string::String`
44 --> $DIR/useless_conversion.rs:64:13
46 LL | let _ = String::from(format!("A: {:04}", 123));
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("A: {:04}", 123)`
49 error: useless conversion to the same type: `std::str::Lines`
50 --> $DIR/useless_conversion.rs:65:13
52 LL | let _ = "".lines().into_iter();
53 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `"".lines()`
55 error: useless conversion to the same type: `std::vec::IntoIter<i32>`
56 --> $DIR/useless_conversion.rs:66:13
58 LL | let _ = vec![1, 2, 3].into_iter().into_iter();
59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![1, 2, 3].into_iter()`
61 error: useless conversion to the same type: `std::string::String`
62 --> $DIR/useless_conversion.rs:67:21
64 LL | let _: String = format!("Hello {}", "world").into();
65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Hello {}", "world")`
67 error: useless conversion to the same type: `i32`
68 --> $DIR/useless_conversion.rs:72:13
70 LL | let _ = i32::from(a + b) * 3;
71 | ^^^^^^^^^^^^^^^^ help: consider removing `i32::from()`: `(a + b)`
73 error: useless conversion to the same type: `Foo<'a'>`
74 --> $DIR/useless_conversion.rs:78:23
76 LL | let _: Foo<'a'> = s2.into();
77 | ^^^^^^^^^ help: consider removing `.into()`: `s2`
79 error: useless conversion to the same type: `Foo<'a'>`
80 --> $DIR/useless_conversion.rs:80:13
82 LL | let _ = Foo::<'a'>::from(s3);
83 | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `Foo::<'a'>::from()`: `s3`
85 error: useless conversion to the same type: `std::vec::IntoIter<Foo<'a'>>`
86 --> $DIR/useless_conversion.rs:82:13
88 LL | let _ = vec![s4, s4, s4].into_iter().into_iter();
89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![s4, s4, s4].into_iter()`
91 error: aborting due to 14 previous errors