]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/consts-opaque.stderr
Rollup merge of #80298 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez
[rust.git] / src / test / ui / pattern / usefulness / consts-opaque.stderr
1 error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
2   --> $DIR/consts-opaque.rs:34:9
3    |
4 LL |         FOO => {}
5    |         ^^^
6
7 error: unreachable pattern
8   --> $DIR/consts-opaque.rs:36:9
9    |
10 LL |         _ => {} // should not be emitting unreachable warning
11    |         ^
12    |
13 note: the lint level is defined here
14   --> $DIR/consts-opaque.rs:6:9
15    |
16 LL | #![deny(unreachable_patterns)]
17    |         ^^^^^^^^^^^^^^^^^^^^
18
19 error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
20   --> $DIR/consts-opaque.rs:41:9
21    |
22 LL |         FOO_REF => {}
23    |         ^^^^^^^
24
25 error: unreachable pattern
26   --> $DIR/consts-opaque.rs:43:9
27    |
28 LL |         Foo(_) => {} // should not be emitting unreachable warning
29    |         ^^^^^^
30
31 warning: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
32   --> $DIR/consts-opaque.rs:49:9
33    |
34 LL |         FOO_REF_REF => {}
35    |         ^^^^^^^^^^^
36    |
37    = note: `#[warn(indirect_structural_match)]` on by default
38    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
39    = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
40
41 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
42   --> $DIR/consts-opaque.rs:57:9
43    |
44 LL |         BAR => {} // should not be emitting unreachable warning
45    |         ^^^
46
47 error: unreachable pattern
48   --> $DIR/consts-opaque.rs:57:9
49    |
50 LL |         Bar => {}
51    |         --- matches any value
52 LL |         BAR => {} // should not be emitting unreachable warning
53    |         ^^^ unreachable pattern
54
55 error: unreachable pattern
56   --> $DIR/consts-opaque.rs:60:9
57    |
58 LL |         Bar => {}
59    |         --- matches any value
60 ...
61 LL |         _ => {}
62    |         ^ unreachable pattern
63
64 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
65   --> $DIR/consts-opaque.rs:65:9
66    |
67 LL |         BAR => {}
68    |         ^^^
69
70 error: unreachable pattern
71   --> $DIR/consts-opaque.rs:67:9
72    |
73 LL |         Bar => {} // should not be emitting unreachable warning
74    |         ^^^
75
76 error: unreachable pattern
77   --> $DIR/consts-opaque.rs:69:9
78    |
79 LL |         Bar => {} // should not be emitting unreachable warning
80    |         --- matches any value
81 LL |
82 LL |         _ => {}
83    |         ^ unreachable pattern
84
85 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
86   --> $DIR/consts-opaque.rs:74:9
87    |
88 LL |         BAR => {}
89    |         ^^^
90
91 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
92   --> $DIR/consts-opaque.rs:76:9
93    |
94 LL |         BAR => {} // should not be emitting unreachable warning
95    |         ^^^
96
97 error: unreachable pattern
98   --> $DIR/consts-opaque.rs:76:9
99    |
100 LL |         BAR => {} // should not be emitting unreachable warning
101    |         ^^^
102
103 error: unreachable pattern
104   --> $DIR/consts-opaque.rs:79:9
105    |
106 LL |         _ => {} // should not be emitting unreachable warning
107    |         ^
108
109 error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
110   --> $DIR/consts-opaque.rs:84:9
111    |
112 LL |         BAZ => {}
113    |         ^^^
114
115 error: unreachable pattern
116   --> $DIR/consts-opaque.rs:86:9
117    |
118 LL |         Baz::Baz1 => {} // should not be emitting unreachable warning
119    |         ^^^^^^^^^
120
121 error: unreachable pattern
122   --> $DIR/consts-opaque.rs:88:9
123    |
124 LL |         _ => {}
125    |         ^
126
127 error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
128   --> $DIR/consts-opaque.rs:94:9
129    |
130 LL |         BAZ => {}
131    |         ^^^
132
133 error: unreachable pattern
134   --> $DIR/consts-opaque.rs:96:9
135    |
136 LL |         _ => {}
137    |         ^
138
139 error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
140   --> $DIR/consts-opaque.rs:101:9
141    |
142 LL |         BAZ => {}
143    |         ^^^
144
145 error: unreachable pattern
146   --> $DIR/consts-opaque.rs:103:9
147    |
148 LL |         Baz::Baz2 => {} // should not be emitting unreachable warning
149    |         ^^^^^^^^^
150
151 error: unreachable pattern
152   --> $DIR/consts-opaque.rs:105:9
153    |
154 LL |         _ => {} // should not be emitting unreachable warning
155    |         ^
156
157 error: aborting due to 22 previous errors; 1 warning emitted
158