Skip to content

Commit

Permalink
Some types cannot show up as the type of a pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Dec 8, 2023
1 parent ddef5b6 commit 76018cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,13 +1101,14 @@ impl ConstructorSet {
| ty::Dynamic(_, _, _)
| ty::Closure(_, _)
| ty::Coroutine(_, _, _)
| ty::CoroutineWitness(_, _)
| ty::Alias(_, _)
| ty::Param(_)
| ty::Bound(_, _)
| ty::Placeholder(_)
| ty::Infer(_)
| ty::Error(_) => Self::Unlistable,
ty::CoroutineWitness(_, _) | ty::Infer(_) => {
bug!("Encountered unexpected type in `ConstructorSet::for_ty`: {ty:?}")
}
}
}

Expand Down

0 comments on commit 76018cd

Please sign in to comment.