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 9, 2023
1 parent ddef5b6 commit c3df51a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 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,12 @@ 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::Bound(_, _) | ty::Placeholder(_) | ty::Infer(_) => {
bug!("Encountered unexpected type in `ConstructorSet::for_ty`: {ty:?}")
}
}
}

Expand Down

0 comments on commit c3df51a

Please sign in to comment.