summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/redundant_type_annotations.stderr
blob: 988ebe6372268a46cbb3765dec3e7a1925325e78 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:81:9
   |
LL |         let v: u32 = self.return_an_int();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::redundant-type-annotations` implied by `-D warnings`

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:82:9
   |
LL |         let v: &u32 = self.return_a_ref();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:83:9
   |
LL |         let v: &Slice = self.return_a_ref_to_struct();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:155:5
   |
LL |     let _return: String = return_a_string();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:157:5
   |
LL |     let _return: Pie = return_a_struct();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:159:5
   |
LL |     let _return: Pizza = return_an_enum();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:161:5
   |
LL |     let _return: u32 = return_an_int();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:163:5
   |
LL |     let _return: String = String::new();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:165:5
   |
LL |     let new_pie: Pie = Pie::new();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:167:5
   |
LL |     let _return: u32 = new_pie.return_an_int();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:169:5
   |
LL |     let _return: u32 = Pie::associated_return_an_int();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:171:5
   |
LL |     let _return: String = Pie::associated_return_a_string();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:177:5
   |
LL |     let _var: u32 = u32::MAX;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:179:5
   |
LL |     let _var: u32 = 5_u32;
   |     ^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:181:5
   |
LL |     let _var: &str = "test";
   |     ^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:183:5
   |
LL |     let _var: &[u8] = b"test";
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant type annotation
  --> $DIR/redundant_type_annotations.rs:185:5
   |
LL |     let _var: bool = false;
   |     ^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 17 previous errors