Skip to content

Commit 715cd99

Browse files
committed
Make Placeholder, GeneratorWitness*, Infer and Error unreachable on SMIR rustc_ty_to_ty
1 parent 05b82e5 commit 715cd99

File tree

1 file changed

+7
-5
lines changed
  • compiler/rustc_smir/src/rustc_smir

1 file changed

+7
-5
lines changed

compiler/rustc_smir/src/rustc_smir/mod.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,23 @@ impl<'tcx> Tables<'tcx> {
101101
ty::Ref(_, _, _) => todo!(),
102102
ty::FnDef(_, _) => todo!(),
103103
ty::FnPtr(_) => todo!(),
104-
ty::Placeholder(..) => todo!(),
105104
ty::Dynamic(_, _, _) => todo!(),
106105
ty::Closure(_, _) => todo!(),
107106
ty::Generator(_, _, _) => todo!(),
108-
ty::GeneratorWitness(_) => todo!(),
109-
ty::GeneratorWitnessMIR(_, _) => todo!(),
110107
ty::Never => todo!(),
111108
ty::Tuple(fields) => TyKind::RigidTy(RigidTy::Tuple(
112109
fields.iter().map(|ty| self.intern_ty(ty)).collect(),
113110
)),
114111
ty::Alias(_, _) => todo!(),
115112
ty::Param(_) => todo!(),
116113
ty::Bound(_, _) => todo!(),
117-
ty::Infer(_) => todo!(),
118-
ty::Error(_) => todo!(),
114+
ty::Placeholder(..)
115+
| ty::GeneratorWitness(_)
116+
| ty::GeneratorWitnessMIR(_, _)
117+
| ty::Infer(_)
118+
| ty::Error(_) => {
119+
unreachable!();
120+
}
119121
}
120122
}
121123

0 commit comments

Comments
 (0)