Skip to content

Commit 66233fb

Browse files
authored
Rollup merge of #113553 - spastorino:smir-types-2, r=oli-obk
Make Placeholder, GeneratorWitness*, Infer and Error unreachable on SMIR rustc_ty_to_ty Let's remove these todos to not confuse ``@ericmarkmartin`` if they pick some conversion up. r? ``@oli-obk``
2 parents 893a5d2 + 715cd99 commit 66233fb

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
@@ -103,21 +103,23 @@ impl<'tcx> Tables<'tcx> {
103103
ty::Ref(_, _, _) => todo!(),
104104
ty::FnDef(_, _) => todo!(),
105105
ty::FnPtr(_) => todo!(),
106-
ty::Placeholder(..) => todo!(),
107106
ty::Dynamic(_, _, _) => todo!(),
108107
ty::Closure(_, _) => todo!(),
109108
ty::Generator(_, _, _) => todo!(),
110-
ty::GeneratorWitness(_) => todo!(),
111-
ty::GeneratorWitnessMIR(_, _) => todo!(),
112109
ty::Never => todo!(),
113110
ty::Tuple(fields) => TyKind::RigidTy(RigidTy::Tuple(
114111
fields.iter().map(|ty| self.intern_ty(ty)).collect(),
115112
)),
116113
ty::Alias(_, _) => todo!(),
117114
ty::Param(_) => todo!(),
118115
ty::Bound(_, _) => todo!(),
119-
ty::Infer(_) => todo!(),
120-
ty::Error(_) => todo!(),
116+
ty::Placeholder(..)
117+
| ty::GeneratorWitness(_)
118+
| ty::GeneratorWitnessMIR(_, _)
119+
| ty::Infer(_)
120+
| ty::Error(_) => {
121+
unreachable!();
122+
}
121123
}
122124
}
123125

0 commit comments

Comments
 (0)