]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr
New upstream version 1.41.1+dfsg1
[rustc.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:26:9
3 |
4 LL | let i_think_continually = 2;
5 | ^^^^^^^^^^^^^^^^^^^ help: consider prefixing with an underscore: `_i_think_continually`
6 |
7 note: lint level 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: consider prefixing 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: consider prefixing 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: consider prefixing 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 note: lint level defined here
53 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:5:9
54 |
55 LL | #![warn(unused)] // UI tests pass `-A unused` (#43896)
56 | ^^^^^^
57 = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
58 = help: maybe it is overwritten before being read?
59
60 warning: unused variable: `fire`
61 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:52:32
62 |
63 LL | let LovelyAmbition { lips, fire } = the_spirit;
64 | ^^^^ help: try ignoring the field: `fire: _`
65
66 warning: unused variable: `case`
67 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:61:23
68 |
69 LL | Large::Suit { case } => {}
70 | ^^^^ help: try ignoring the field: `case: _`
71
72 warning: unused variable: `case`
73 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:66:24
74 |
75 LL | &Large::Suit { case } => {}
76 | ^^^^ help: try ignoring the field: `case: _`
77
78 warning: unused variable: `case`
79 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:71:27
80 |
81 LL | box Large::Suit { case } => {}
82 | ^^^^ help: try ignoring the field: `case: _`
83
84 warning: unused variable: `case`
85 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:76:24
86 |
87 LL | (Large::Suit { case },) => {}
88 | ^^^^ help: try ignoring the field: `case: _`
89
90 warning: unused variable: `case`
91 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:81:24
92 |
93 LL | [Large::Suit { case }] => {}
94 | ^^^^ help: try ignoring the field: `case: _`
95
96 warning: unused variable: `case`
97 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:86:29
98 |
99 LL | Tuple(Large::Suit { case }, ()) => {}
100 | ^^^^ help: try ignoring the field: `case: _`
101
102 warning: variable does not need to be mutable
103 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:9
104 |
105 LL | let mut mut_unused_var = 1;
106 | ----^^^^^^^^^^^^^^
107 | |
108 | help: remove this `mut`
109 |
110 note: lint level defined here
111 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:5:9
112 |
113 LL | #![warn(unused)] // UI tests pass `-A unused` (#43896)
114 | ^^^^^^
115 = note: `#[warn(unused_mut)]` implied by `#[warn(unused)]`
116
117 warning: variable does not need to be mutable
118 --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:10
119 |
120 LL | let (mut var, unused_var) = (1, 2);
121 | ----^^^
122 | |
123 | help: remove this `mut`
124