Make sure we keep emitting a hard error

This commit is contained in:
Oliver Scherer 2020-09-23 18:36:53 +02:00
parent 017423179a
commit da217644a1
3 changed files with 37 additions and 31 deletions

View file

@ -10,8 +10,6 @@ fn main() {
match C {
C => {}
//~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
//~| WARN must be annotated
//~| WARN previously accepted
}
const K: &T = &T;
match K {

View file

@ -1,18 +1,8 @@
warning: to use a constant of type `S` in a pattern, `S` must be annotated with `#[derive(PartialEq, Eq)]`
--> $DIR/match_ice.rs:11:9
|
LL | C => {}
| ^
|
= note: `#[warn(indirect_structural_match)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
error: to use a constant of type `S` in a pattern, `S` must be annotated with `#[derive(PartialEq, Eq)]`
--> $DIR/match_ice.rs:11:9
|
LL | C => {}
| ^
error: aborting due to previous error; 1 warning emitted
error: aborting due to previous error