1 error[E0004]: non-exhaustive patterns: `B` and `C` not covered
2 --> $DIR/non-exhaustive-defined-here.rs:38:11
5 | ^^ patterns `B` and `C` not covered
8 --> $DIR/non-exhaustive-defined-here.rs:14:5
18 = note: the matched value is of type `E`
19 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
25 error[E0005]: refutable pattern in local binding: `B` and `C` not covered
26 --> $DIR/non-exhaustive-defined-here.rs:44:9
29 | ^^^^ patterns `B` and `C` not covered
31 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
32 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
33 note: `E` defined here
34 --> $DIR/non-exhaustive-defined-here.rs:14:5
44 = note: the matched value is of type `E`
45 help: you might want to use `if let` to ignore the variants that aren't matched
47 LL | if let E::A = e { todo!() }
50 error[E0004]: non-exhaustive patterns: `&B` and `&C` not covered
51 --> $DIR/non-exhaustive-defined-here.rs:52:11
54 | ^ patterns `&B` and `&C` not covered
56 note: `E` defined here
57 --> $DIR/non-exhaustive-defined-here.rs:14:5
67 = note: the matched value is of type `&E`
68 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
71 LL + &B | &C => todo!()
74 error[E0005]: refutable pattern in local binding: `&B` and `&C` not covered
75 --> $DIR/non-exhaustive-defined-here.rs:58:9
78 | ^^^^ patterns `&B` and `&C` not covered
80 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
81 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
82 note: `E` defined here
83 --> $DIR/non-exhaustive-defined-here.rs:14:5
93 = note: the matched value is of type `&E`
94 help: you might want to use `if let` to ignore the variants that aren't matched
96 LL | if let E::A = e { todo!() }
99 error[E0004]: non-exhaustive patterns: `&&mut &B` and `&&mut &C` not covered
100 --> $DIR/non-exhaustive-defined-here.rs:66:11
103 | ^ patterns `&&mut &B` and `&&mut &C` not covered
105 note: `E` defined here
106 --> $DIR/non-exhaustive-defined-here.rs:14:5
116 = note: the matched value is of type `&&mut &E`
117 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
120 LL + &&mut &B | &&mut &C => todo!()
123 error[E0005]: refutable pattern in local binding: `&&mut &B` and `&&mut &C` not covered
124 --> $DIR/non-exhaustive-defined-here.rs:72:9
127 | ^^^^ patterns `&&mut &B` and `&&mut &C` not covered
129 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
130 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
131 note: `E` defined here
132 --> $DIR/non-exhaustive-defined-here.rs:14:5
142 = note: the matched value is of type `&&mut &E`
143 help: you might want to use `if let` to ignore the variants that aren't matched
145 LL | if let E::A = e { todo!() }
148 error[E0004]: non-exhaustive patterns: `None` not covered
149 --> $DIR/non-exhaustive-defined-here.rs:92:11
152 | ^ pattern `None` not covered
154 note: `Opt` defined here
155 --> $DIR/non-exhaustive-defined-here.rs:84:5
162 = note: the matched value is of type `Opt`
163 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
165 LL ~ Opt::Some(ref _x) => {}
169 error[E0005]: refutable pattern in local binding: `None` not covered
170 --> $DIR/non-exhaustive-defined-here.rs:98:9
172 LL | let Opt::Some(ref _x) = e;
173 | ^^^^^^^^^^^^^^^^^ pattern `None` not covered
175 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
176 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
177 note: `Opt` defined here
178 --> $DIR/non-exhaustive-defined-here.rs:84:5
185 = note: the matched value is of type `Opt`
186 help: you might want to use `if let` to ignore the variant that isn't matched
188 LL | let _x = if let Opt::Some(ref _x) = e { _x } else { todo!() };
189 | +++++++++++ +++++++++++++++++++++++
190 help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
192 LL | let Opt::Some(ref _x) = e else { todo!() };
195 error: aborting due to 8 previous errors
197 Some errors have detailed explanations: E0004, E0005.
198 For more information about an error, try `rustc --explain E0004`.