summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.stderr
blob: 26fa6eb9b9bc6bcb57c6f7ceb7731f1e0486ac42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
warning: unused variable: `i_think_continually`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:26:9
   |
LL |     let i_think_continually = 2;
   |         ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_i_think_continually`
   |
note: the lint level is defined here
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:5:9
   |
LL | #![warn(unused)] // UI tests pass `-A unused` (#43896)
   |         ^^^^^^
   = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`

warning: unused variable: `mut_unused_var`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:13
   |
LL |     let mut mut_unused_var = 1;
   |             ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mut_unused_var`

warning: unused variable: `var`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:14
   |
LL |     let (mut var, unused_var) = (1, 2);
   |              ^^^ help: if this is intentional, prefix it with an underscore: `_var`

warning: unused variable: `unused_var`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:19
   |
LL |     let (mut var, unused_var) = (1, 2);
   |                   ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused_var`

warning: unused variable: `corridors_of_light`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:26
   |
LL |     if let SoulHistory { corridors_of_light,
   |                          ^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `corridors_of_light: _`

warning: variable `hours_are_suns` is assigned to, but never used
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:46:30
   |
LL |                          mut hours_are_suns,
   |                              ^^^^^^^^^^^^^^
   |
   = note: consider using `_hours_are_suns` instead

warning: value assigned to `hours_are_suns` is never read
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:48:9
   |
LL |         hours_are_suns = false;
   |         ^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
   = help: maybe it is overwritten before being read?

warning: unused variable: `fire`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:52:32
   |
LL |     let LovelyAmbition { lips, fire } = the_spirit;
   |                                ^^^^ help: try ignoring the field: `fire: _`

warning: unused variable: `case`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:61:23
   |
LL |         Large::Suit { case } => {}
   |                       ^^^^ help: try ignoring the field: `case: _`

warning: unused variable: `case`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:66:24
   |
LL |         &Large::Suit { case } => {}
   |                        ^^^^ help: try ignoring the field: `case: _`

warning: unused variable: `case`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:71:27
   |
LL |         box Large::Suit { case } => {}
   |                           ^^^^ help: try ignoring the field: `case: _`

warning: unused variable: `case`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:76:24
   |
LL |         (Large::Suit { case },) => {}
   |                        ^^^^ help: try ignoring the field: `case: _`

warning: unused variable: `case`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:81:24
   |
LL |         [Large::Suit { case }] => {}
   |                        ^^^^ help: try ignoring the field: `case: _`

warning: unused variable: `case`
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:86:29
   |
LL |         Tuple(Large::Suit { case }, ()) => {}
   |                             ^^^^ help: try ignoring the field: `case: _`

warning: variable does not need to be mutable
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:9
   |
LL |     let mut mut_unused_var = 1;
   |         ----^^^^^^^^^^^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` implied by `#[warn(unused)]`

warning: variable does not need to be mutable
  --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:10
   |
LL |     let (mut var, unused_var) = (1, 2);
   |          ----^^^
   |          |
   |          help: remove this `mut`

warning: 16 warnings emitted