]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/useless_conversion_try.stderr
Rollup merge of #100462 - zohnannor:master, r=thomcc
[rust.git] / src / tools / clippy / tests / ui / useless_conversion_try.stderr
1 error: useless conversion to the same type: `T`
2   --> $DIR/useless_conversion_try.rs:4:13
3    |
4 LL |     let _ = T::try_from(val).unwrap();
5    |             ^^^^^^^^^^^^^^^^
6    |
7    = help: consider removing `T::try_from()`
8 note: the lint level is defined here
9   --> $DIR/useless_conversion_try.rs:1:9
10    |
11 LL | #![deny(clippy::useless_conversion)]
12    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
13
14 error: useless conversion to the same type: `T`
15   --> $DIR/useless_conversion_try.rs:5:5
16    |
17 LL |     val.try_into().unwrap()
18    |     ^^^^^^^^^^^^^^
19    |
20    = help: consider removing `.try_into()`
21
22 error: useless conversion to the same type: `std::string::String`
23   --> $DIR/useless_conversion_try.rs:27:21
24    |
25 LL |     let _: String = "foo".to_string().try_into().unwrap();
26    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27    |
28    = help: consider removing `.try_into()`
29
30 error: useless conversion to the same type: `std::string::String`
31   --> $DIR/useless_conversion_try.rs:28:21
32    |
33 LL |     let _: String = TryFrom::try_from("foo".to_string()).unwrap();
34    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35    |
36    = help: consider removing `TryFrom::try_from()`
37
38 error: useless conversion to the same type: `std::string::String`
39   --> $DIR/useless_conversion_try.rs:29:13
40    |
41 LL |     let _ = String::try_from("foo".to_string()).unwrap();
42    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43    |
44    = help: consider removing `String::try_from()`
45
46 error: useless conversion to the same type: `std::string::String`
47   --> $DIR/useless_conversion_try.rs:30:13
48    |
49 LL |     let _ = String::try_from(format!("A: {:04}", 123)).unwrap();
50    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51    |
52    = help: consider removing `String::try_from()`
53
54 error: useless conversion to the same type: `std::string::String`
55   --> $DIR/useless_conversion_try.rs:31:21
56    |
57 LL |     let _: String = format!("Hello {}", "world").try_into().unwrap();
58    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59    |
60    = help: consider removing `.try_into()`
61
62 error: useless conversion to the same type: `std::string::String`
63   --> $DIR/useless_conversion_try.rs:32:21
64    |
65 LL |     let _: String = String::new().try_into().unwrap();
66    |                     ^^^^^^^^^^^^^^^^^^^^^^^^
67    |
68    = help: consider removing `.try_into()`
69
70 error: useless conversion to the same type: `std::string::String`
71   --> $DIR/useless_conversion_try.rs:33:27
72    |
73 LL |     let _: String = match String::from("_").try_into() {
74    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75    |
76    = help: consider removing `.try_into()`
77
78 error: aborting due to 9 previous errors
79