From 3df9afcae781c2d9db5a2cb9acde9be5ae753285 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 13 Oct 2022 07:33:34 +0000 Subject: [PATCH] rustdoc: don't ICE on `TyKind::Typeof` --- src/librustdoc/clean/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 8d556a962d9..7f82dfbd3d6 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -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, } }