// Issue 62307 pointed out a case where the structural-match checking
// was too shallow.
-#![warn(indirect_structural_match)]
+#![warn(indirect_structural_match, nontrivial_structural_match)]
// run-pass
#[derive(Debug)]
match RR_B0 {
RR_B1 => { println!("CLAIM RR0: {:?} matches {:?}", RR_B1, RR_B0); }
//~^ WARN must be annotated with `#[derive(PartialEq, Eq)]`
- //~| WARN will become a hard error in a future release
+ //~| WARN this was previously accepted
_ => { }
}
match RR_B1 {
RR_B1 => { println!("CLAIM RR1: {:?} matches {:?}", RR_B1, RR_B1); }
//~^ WARN must be annotated with `#[derive(PartialEq, Eq)]`
- //~| WARN will become a hard error in a future release
+ //~| WARN this was previously accepted
_ => { }
}
}