Use assert_matches around the compiler
This commit is contained in:
parent
68d2e8a66e
commit
c361c924a0
39 changed files with 100 additions and 49 deletions
|
@ -249,7 +249,7 @@ pub(super) fn sanity_check_layout<'tcx>(
|
|||
if let Variants::Multiple { variants, .. } = &layout.variants {
|
||||
for variant in variants.iter() {
|
||||
// No nested "multiple".
|
||||
assert!(matches!(variant.variants, Variants::Single { .. }));
|
||||
assert_matches!(variant.variants, Variants::Single { .. });
|
||||
// Variants should have the same or a smaller size as the full thing,
|
||||
// and same for alignment.
|
||||
if variant.size > layout.size {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue