Fix RegionKind: PartialEq to account for ReError

This commit is contained in:
Esteban Küber 2023-02-07 15:47:28 +00:00
parent ed8651c7b8
commit 3222725538

View File

@ -1022,10 +1022,11 @@ impl<I: Interner> PartialEq for RegionKind<I> {
(ReVar(a_r), ReVar(b_r)) => a_r == b_r,
(RePlaceholder(a_r), RePlaceholder(b_r)) => a_r == b_r,
(ReErased, ReErased) => true,
(ReError(_), ReError(_)) => true,
_ => {
debug_assert!(
false,
"This branch must be unreachable, maybe the match is missing an arm? self = self = {self:?}, other = {other:?}"
"This branch must be unreachable, maybe the match is missing an arm? self = {self:?}, other = {other:?}"
);
true
}