rustdoc: don't ICE on TyKind::Typeof

This commit is contained in:
Maybe Waffle 2022-10-13 07:33:34 +00:00
parent 2a9217601c
commit 3df9afcae7

View File

@ -1543,8 +1543,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T
}
TyKind::BareFn(barefn) => BareFunction(Box::new(clean_bare_fn_ty(barefn, cx))),
// Rustdoc handles `TyKind::Err`s by turning them into `Type::Infer`s.
TyKind::Infer | TyKind::Err => Infer,
TyKind::Typeof(..) => panic!("unimplemented type {:?}", ty.kind),
TyKind::Infer | TyKind::Err | TyKind::Typeof(..) => Infer,
}
}