Skip to content

Commit 3222725

Browse files
committed
Fix RegionKind: PartialEq to account for ReError
1 parent ed8651c commit 3222725

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_type_ir/src

1 file changed

+2
-1
lines changed

compiler/rustc_type_ir/src/sty.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1022,10 +1022,11 @@ impl<I: Interner> PartialEq for RegionKind<I> {
10221022
(ReVar(a_r), ReVar(b_r)) => a_r == b_r,
10231023
(RePlaceholder(a_r), RePlaceholder(b_r)) => a_r == b_r,
10241024
(ReErased, ReErased) => true,
1025+
(ReError(_), ReError(_)) => true,
10251026
_ => {
10261027
debug_assert!(
10271028
false,
1028-
"This branch must be unreachable, maybe the match is missing an arm? self = self = {self:?}, other = {other:?}"
1029+
"This branch must be unreachable, maybe the match is missing an arm? self = {self:?}, other = {other:?}"
10291030
);
10301031
true
10311032
}

0 commit comments

Comments
 (0)