ICE on types that should not be defining opaque types

This commit is contained in:
Oli Scherer 2023-06-19 11:19:05 +00:00
parent 0af4a211be
commit b0b4a07959

View File

@ -217,7 +217,9 @@ fn opaque_types_defined_by<'tcx>(tcx: TyCtxt<'tcx>, item: LocalDefId) -> &'tcx [
| DefKind::GlobalAsm | DefKind::GlobalAsm
| DefKind::Impl { .. } | DefKind::Impl { .. }
| DefKind::Closure | DefKind::Closure
| DefKind::Generator => &[], | DefKind::Generator => {
span_bug!(tcx.def_span(item), "{kind:?} is type checked as part of its parent")
}
} }
} }