]> git.lizzy.rs Git - rust.git/blob - tests/ui/useless_conversion.stderr
Auto merge of #5568 - ThibsG:RenameIdentityConversionLint, r=flip1995
[rust.git] / tests / ui / useless_conversion.stderr
1 error: useless conversion
2   --> $DIR/useless_conversion.rs:6:13
3    |
4 LL |     let _ = T::from(val);
5    |             ^^^^^^^^^^^^ help: consider removing `T::from()`: `val`
6    |
7 note: the lint level is defined here
8   --> $DIR/useless_conversion.rs:3:9
9    |
10 LL | #![deny(clippy::useless_conversion)]
11    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error: useless conversion
14   --> $DIR/useless_conversion.rs:7:5
15    |
16 LL |     val.into()
17    |     ^^^^^^^^^^ help: consider removing `.into()`: `val`
18
19 error: useless conversion
20   --> $DIR/useless_conversion.rs:19:22
21    |
22 LL |         let _: i32 = 0i32.into();
23    |                      ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`
24
25 error: useless conversion
26   --> $DIR/useless_conversion.rs:51:21
27    |
28 LL |     let _: String = "foo".to_string().into();
29    |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"foo".to_string()`
30
31 error: useless conversion
32   --> $DIR/useless_conversion.rs:52:21
33    |
34 LL |     let _: String = From::from("foo".to_string());
35    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `From::from()`: `"foo".to_string()`
36
37 error: useless conversion
38   --> $DIR/useless_conversion.rs:53:13
39    |
40 LL |     let _ = String::from("foo".to_string());
41    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `"foo".to_string()`
42
43 error: useless conversion
44   --> $DIR/useless_conversion.rs:54:13
45    |
46 LL |     let _ = String::from(format!("A: {:04}", 123));
47    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("A: {:04}", 123)`
48
49 error: useless conversion
50   --> $DIR/useless_conversion.rs:55:13
51    |
52 LL |     let _ = "".lines().into_iter();
53    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `"".lines()`
54
55 error: useless conversion
56   --> $DIR/useless_conversion.rs:56:13
57    |
58 LL |     let _ = vec![1, 2, 3].into_iter().into_iter();
59    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![1, 2, 3].into_iter()`
60
61 error: useless conversion
62   --> $DIR/useless_conversion.rs:57:21
63    |
64 LL |     let _: String = format!("Hello {}", "world").into();
65    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Hello {}", "world")`
66
67 error: aborting due to 10 previous errors
68