1
Fork 0

Use assert_matches around the compiler

This commit is contained in:
Michael Goulet 2024-08-11 12:10:36 -04:00
parent 68d2e8a66e
commit c361c924a0
39 changed files with 100 additions and 49 deletions

View file

@ -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 {