summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/useless_conversion.stderr
blob: 84ec53702788c12592f02387ec2deaef7f5c36c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:6:13
   |
LL |     let _ = T::from(val);
   |             ^^^^^^^^^^^^ help: consider removing `T::from()`: `val`
   |
note: the lint level is defined here
  --> $DIR/useless_conversion.rs:3:9
   |
LL | #![deny(clippy::useless_conversion)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:7:5
   |
LL |     val.into()
   |     ^^^^^^^^^^ help: consider removing `.into()`: `val`

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:19:22
   |
LL |         let _: i32 = 0i32.into();
   |                      ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:51:21
   |
LL |     let _: String = "foo".to_string().into();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"foo".to_string()`

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:52:21
   |
LL |     let _: String = From::from("foo".to_string());
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `From::from()`: `"foo".to_string()`

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:53:13
   |
LL |     let _ = String::from("foo".to_string());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `"foo".to_string()`

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:54:13
   |
LL |     let _ = String::from(format!("A: {:04}", 123));
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("A: {:04}", 123)`

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:55:13
   |
LL |     let _ = "".lines().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `"".lines()`

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:56:13
   |
LL |     let _ = vec![1, 2, 3].into_iter().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![1, 2, 3].into_iter()`

error: useless conversion to the same type
  --> $DIR/useless_conversion.rs:57:21
   |
LL |     let _: String = format!("Hello {}", "world").into();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Hello {}", "world")`

error: aborting due to 10 previous errors