fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
4.2 KiB116 linesraw
1warning: unused variable: `i_think_continually`
2  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:26:9
3   |
4LL |     let i_think_continually = 2;
5   |         ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_i_think_continually`
6   |
7note: the lint level is defined here
8  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:5:9
9   |
10LL | #![warn(unused)] // UI tests pass `-A unused` (#43896)
11   |         ^^^^^^
12   = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
13
14warning: unused variable: `mut_unused_var`
15  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:13
16   |
17LL |     let mut mut_unused_var = 1;
18   |             ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mut_unused_var`
19
20warning: unused variable: `var`
21  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:14
22   |
23LL |     let (mut var, unused_var) = (1, 2);
24   |              ^^^ help: if this is intentional, prefix it with an underscore: `_var`
25
26warning: unused variable: `unused_var`
27  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:19
28   |
29LL |     let (mut var, unused_var) = (1, 2);
30   |                   ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused_var`
31
32warning: unused variable: `corridors_of_light`
33  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:26
34   |
35LL |     if let SoulHistory { corridors_of_light,
36   |                          ^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `corridors_of_light: _`
37
38warning: variable `hours_are_suns` is assigned to, but never used
39  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:46:30
40   |
41LL |                          mut hours_are_suns,
42   |                              ^^^^^^^^^^^^^^
43   |
44   = note: consider using `_hours_are_suns` instead
45
46warning: value assigned to `hours_are_suns` is never read
47  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:48:9
48   |
49LL |         hours_are_suns = false;
50   |         ^^^^^^^^^^^^^^
51   |
52   = help: maybe it is overwritten before being read?
53   = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
54
55warning: unused variable: `fire`
56  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:52:32
57   |
58LL |     let LovelyAmbition { lips, fire } = the_spirit;
59   |                                ^^^^ help: try ignoring the field: `fire: _`
60
61warning: unused variable: `case`
62  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:61:23
63   |
64LL |         Large::Suit { case } => {}
65   |                       ^^^^ help: try ignoring the field: `case: _`
66
67warning: unused variable: `case`
68  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:66:24
69   |
70LL |         &Large::Suit { case } => {}
71   |                        ^^^^ help: try ignoring the field: `case: _`
72
73warning: unused variable: `case`
74  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:71:27
75   |
76LL |         box Large::Suit { case } => {}
77   |                           ^^^^ help: try ignoring the field: `case: _`
78
79warning: unused variable: `case`
80  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:76:24
81   |
82LL |         (Large::Suit { case },) => {}
83   |                        ^^^^ help: try ignoring the field: `case: _`
84
85warning: unused variable: `case`
86  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:81:24
87   |
88LL |         [Large::Suit { case }] => {}
89   |                        ^^^^ help: try ignoring the field: `case: _`
90
91warning: unused variable: `case`
92  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:86:29
93   |
94LL |         Tuple(Large::Suit { case }, ()) => {}
95   |                             ^^^^ help: try ignoring the field: `case: _`
96
97warning: variable does not need to be mutable
98  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:9
99   |
100LL |     let mut mut_unused_var = 1;
101   |         ----^^^^^^^^^^^^^^
102   |         |
103   |         help: remove this `mut`
104   |
105   = note: `#[warn(unused_mut)]` implied by `#[warn(unused)]`
106
107warning: variable does not need to be mutable
108  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:10
109   |
110LL |     let (mut var, unused_var) = (1, 2);
111   |          ----^^^
112   |          |
113   |          help: remove this `mut`
114
115warning: 16 warnings emitted
116