diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index b697f945f20..0b705df2a60 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1892,15 +1892,8 @@ 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(_) | TyKind::Typeof(..) | TyKind::InferDelegation(..) => Infer, - TyKind::AnonAdt(item_id) => { - let path = external_path( - cx, - item_id.owner_id.def_id.to_def_id(), - false, - ThinVec::new(), - ty::Binder::dummy(ty::GenericArgs::empty()), - ); - Type::Path { path } + TyKind::AnonAdt(..) => { + unimplemented!("Anonymous structs or unions are not supported yet") } } }