2018-02-01 04:56:01 +00:00
|
|
|
warning: unused variable: `i_think_continually`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:26:9
|
2018-02-01 04:56:01 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | let i_think_continually = 2;
|
2020-03-23 08:02:46 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_i_think_continually`
|
2018-02-01 04:56:01 +00:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:5:9
|
2018-02-01 04:56:01 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | #![warn(unused)] // UI tests pass `-A unused` (#43896)
|
2018-02-01 04:56:01 +00:00
|
|
|
| ^^^^^^
|
2019-07-16 20:17:38 +00:00
|
|
|
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
|
2018-02-01 04:56:01 +00:00
|
|
|
|
2018-05-11 14:24:04 +00:00
|
|
|
warning: unused variable: `mut_unused_var`
|
2021-02-28 20:03:36 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:13
|
2018-05-11 14:24:04 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut_unused_var = 1;
|
2021-02-28 20:03:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mut_unused_var`
|
2018-05-11 14:24:04 +00:00
|
|
|
|
|
|
|
warning: unused variable: `var`
|
2021-02-28 20:03:36 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:14
|
2018-05-11 14:24:04 +00:00
|
|
|
|
|
|
|
|
LL | let (mut var, unused_var) = (1, 2);
|
2021-02-28 20:03:36 +00:00
|
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_var`
|
2018-05-11 14:24:04 +00:00
|
|
|
|
|
|
|
warning: unused variable: `unused_var`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:19
|
2018-05-11 14:24:04 +00:00
|
|
|
|
|
|
|
|
LL | let (mut var, unused_var) = (1, 2);
|
2020-03-23 08:02:46 +00:00
|
|
|
| ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused_var`
|
2018-05-11 14:24:04 +00:00
|
|
|
|
2018-02-01 04:56:01 +00:00
|
|
|
warning: unused variable: `corridors_of_light`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:26
|
2018-02-01 04:56:01 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | if let SoulHistory { corridors_of_light,
|
2018-02-01 04:56:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `corridors_of_light: _`
|
|
|
|
|
|
|
|
warning: variable `hours_are_suns` is assigned to, but never used
|
2021-02-28 20:03:36 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:46:30
|
2018-02-01 04:56:01 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | mut hours_are_suns,
|
2021-02-28 20:03:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2018-02-01 04:56:01 +00:00
|
|
|
|
|
|
|
|
= note: consider using `_hours_are_suns` instead
|
|
|
|
|
|
|
|
warning: value assigned to `hours_are_suns` is never read
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:48:9
|
2018-02-01 04:56:01 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | hours_are_suns = false;
|
2018-02-01 04:56:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
2018-12-07 14:15:36 +00:00
|
|
|
= help: maybe it is overwritten before being read?
|
2022-09-18 15:55:36 +00:00
|
|
|
= note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
|
2018-02-01 04:56:01 +00:00
|
|
|
|
2018-05-18 07:07:31 +00:00
|
|
|
warning: unused variable: `fire`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:52:32
|
2018-05-18 07:07:31 +00:00
|
|
|
|
|
|
|
|
LL | let LovelyAmbition { lips, fire } = the_spirit;
|
|
|
|
| ^^^^ help: try ignoring the field: `fire: _`
|
|
|
|
|
2018-04-29 23:40:11 +00:00
|
|
|
warning: unused variable: `case`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:61:23
|
2018-04-30 00:27:37 +00:00
|
|
|
|
|
|
|
|
LL | Large::Suit { case } => {}
|
|
|
|
| ^^^^ help: try ignoring the field: `case: _`
|
|
|
|
|
|
|
|
warning: unused variable: `case`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:66:24
|
2018-04-29 23:40:11 +00:00
|
|
|
|
|
|
|
|
LL | &Large::Suit { case } => {}
|
|
|
|
| ^^^^ help: try ignoring the field: `case: _`
|
|
|
|
|
2018-04-29 23:51:02 +00:00
|
|
|
warning: unused variable: `case`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:71:27
|
2018-04-29 23:51:02 +00:00
|
|
|
|
|
|
|
|
LL | box Large::Suit { case } => {}
|
|
|
|
| ^^^^ help: try ignoring the field: `case: _`
|
|
|
|
|
2018-04-30 00:27:37 +00:00
|
|
|
warning: unused variable: `case`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:76:24
|
2018-04-30 00:27:37 +00:00
|
|
|
|
|
|
|
|
LL | (Large::Suit { case },) => {}
|
|
|
|
| ^^^^ help: try ignoring the field: `case: _`
|
|
|
|
|
|
|
|
warning: unused variable: `case`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:81:24
|
2018-04-30 00:27:37 +00:00
|
|
|
|
|
|
|
|
LL | [Large::Suit { case }] => {}
|
|
|
|
| ^^^^ help: try ignoring the field: `case: _`
|
|
|
|
|
|
|
|
warning: unused variable: `case`
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:86:29
|
2018-04-30 00:27:37 +00:00
|
|
|
|
|
|
|
|
LL | Tuple(Large::Suit { case }, ()) => {}
|
|
|
|
| ^^^^ help: try ignoring the field: `case: _`
|
|
|
|
|
2018-05-11 14:24:04 +00:00
|
|
|
warning: variable does not need to be mutable
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:9
|
2018-05-11 14:24:04 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut_unused_var = 1;
|
|
|
|
| ----^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
|
2019-07-16 20:17:38 +00:00
|
|
|
= note: `#[warn(unused_mut)]` implied by `#[warn(unused)]`
|
2018-05-11 14:24:04 +00:00
|
|
|
|
|
|
|
warning: variable does not need to be mutable
|
2019-11-06 00:00:00 +00:00
|
|
|
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:10
|
2018-05-11 14:24:04 +00:00
|
|
|
|
|
|
|
|
LL | let (mut var, unused_var) = (1, 2);
|
|
|
|
| ----^^^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2020-03-11 15:30:09 +00:00
|
|
|
warning: 16 warnings emitted
|
|
|
|
|