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