1
Fork 0

Remove incorrect assert

It's incorrect because `CtorSet::split` returns a non-present
constructor into `present` in one specific case: variable-length slices
of an empty type. That's because empty constructors of arity 0 break the
algorithm. This is a tricky corner case that's hard to do cleanly. The
assert wasn't adding much anyway.
This commit is contained in:
Nadrieril 2024-01-07 11:05:18 +01:00
parent 4c2386137a
commit 30ca1c0a5d

View file

@ -94,12 +94,6 @@ impl<'p, 'tcx> PatternColumn<'p, 'tcx> {
column.expand_and_push(subpat);
}
}
assert!(
!specialized_columns[0].is_empty(),
"ctor {ctor:?} was listed as present but isn't;
there is an inconsistency between `Constructor::is_covered_by` and `ConstructorSet::split`"
);
specialized_columns
}
}