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