d1fd11f3f9
Means you'll get more `non-exhaustive` patterns
17 lines
270 B
Rust
17 lines
270 B
Rust
#![deny(unreachable_patterns)]
|
|
|
|
#[derive(PartialEq)]
|
|
struct Opaque(i32);
|
|
|
|
impl Eq for Opaque {}
|
|
|
|
const FOO: Opaque = Opaque(42);
|
|
|
|
fn main() {
|
|
match FOO {
|
|
FOO => {},
|
|
//~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
|
|
_ => {}
|
|
}
|
|
}
|