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