]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr
Move parse-fail tests to UI
[rust.git] / src / test / ui / lint / 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:36:9
3    |
4 LL |     let i_think_continually = 2;
5    |         ^^^^^^^^^^^^^^^^^^^ help: consider using `_i_think_continually` instead
6    |
7 note: lint level defined here
8   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:15: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:43:13
16    |
17 LL |     let mut mut_unused_var = 1;
18    |             ^^^^^^^^^^^^^^ help: consider using `_mut_unused_var` instead
19
20 warning: unused variable: `var`
21   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:14
22    |
23 LL |     let (mut var, unused_var) = (1, 2);
24    |              ^^^ help: consider using `_var` instead
25
26 warning: unused variable: `unused_var`
27   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:19
28    |
29 LL |     let (mut var, unused_var) = (1, 2);
30    |                   ^^^^^^^^^^ help: consider using `_unused_var` instead
31
32 warning: unused variable: `corridors_of_light`
33   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:47: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:48: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:50:9
48    |
49 LL |         hours_are_suns = false;
50    |         ^^^^^^^^^^^^^^
51    |
52 note: lint level defined here
53   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:15:9
54    |
55 LL | #![warn(unused)] // UI tests pass `-A unused` (#43896)
56    |         ^^^^^^
57    = note: #[warn(unused_assignments)] implied by #[warn(unused)]
58
59 warning: unused variable: `fire`
60   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:54:32
61    |
62 LL |     let LovelyAmbition { lips, fire } = the_spirit;
63    |                                ^^^^ help: try ignoring the field: `fire: _`
64
65 warning: unused variable: `case`
66   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:63:23
67    |
68 LL |         Large::Suit { case } => {}
69    |                       ^^^^ help: try ignoring the field: `case: _`
70
71 warning: unused variable: `case`
72   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:68:24
73    |
74 LL |         &Large::Suit { case } => {}
75    |                        ^^^^ help: try ignoring the field: `case: _`
76
77 warning: unused variable: `case`
78   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:73:27
79    |
80 LL |         box Large::Suit { case } => {}
81    |                           ^^^^ help: try ignoring the field: `case: _`
82
83 warning: unused variable: `case`
84   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:78:24
85    |
86 LL |         (Large::Suit { case },) => {}
87    |                        ^^^^ help: try ignoring the field: `case: _`
88
89 warning: unused variable: `case`
90   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:83:24
91    |
92 LL |         [Large::Suit { case }] => {}
93    |                        ^^^^ help: try ignoring the field: `case: _`
94
95 warning: unused variable: `case`
96   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:88:29
97    |
98 LL |         Tuple(Large::Suit { case }, ()) => {}
99    |                             ^^^^ help: try ignoring the field: `case: _`
100
101 warning: variable does not need to be mutable
102   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:43:9
103    |
104 LL |     let mut mut_unused_var = 1;
105    |         ----^^^^^^^^^^^^^^
106    |         |
107    |         help: remove this `mut`
108    |
109 note: lint level defined here
110   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:15:9
111    |
112 LL | #![warn(unused)] // UI tests pass `-A unused` (#43896)
113    |         ^^^^^^
114    = note: #[warn(unused_mut)] implied by #[warn(unused)]
115
116 warning: variable does not need to be mutable
117   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:10
118    |
119 LL |     let (mut var, unused_var) = (1, 2);
120    |          ----^^^
121    |          |
122    |          help: remove this `mut`
123