Skip to content

Commit db39bcd

Browse files
Add traits::NonStructuralMatchTy::TyAlias support in rustc_mir_build
1 parent 87df978 commit db39bcd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ impl<'tcx> ConstToPat<'tcx> {
139139
ty::RawPtr(..) => {
140140
"raw pointers cannot be used in patterns".to_string()
141141
}
142+
traits::NonStructuralMatchTyKind::TyAlias => {
143+
bug!("use of a value of a type alias inside a pattern")
144+
}
142145
_ => {
143146
bug!("use of a value of `{non_sm_ty}` inside a pattern")
144147
}

0 commit comments

Comments
 (0)