Skip to content

Commit c3df51a

Browse files
committed
Some types cannot show up as the type of a pattern
1 parent ddef5b6 commit c3df51a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1101,13 +1101,12 @@ impl ConstructorSet {
11011101
| ty::Dynamic(_, _, _)
11021102
| ty::Closure(_, _)
11031103
| ty::Coroutine(_, _, _)
1104-
| ty::CoroutineWitness(_, _)
11051104
| ty::Alias(_, _)
11061105
| ty::Param(_)
1107-
| ty::Bound(_, _)
1108-
| ty::Placeholder(_)
1109-
| ty::Infer(_)
11101106
| ty::Error(_) => Self::Unlistable,
1107+
ty::CoroutineWitness(_, _) | ty::Bound(_, _) | ty::Placeholder(_) | ty::Infer(_) => {
1108+
bug!("Encountered unexpected type in `ConstructorSet::for_ty`: {ty:?}")
1109+
}
11111110
}
11121111
}
11131112

0 commit comments

Comments
 (0)