about summary refs log tree commit diff
path: root/src/librustdoc/clean
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2022-10-27 17:33:41 +0000
committerDeadbeef <ent3rm4n@gmail.com>2022-11-03 15:09:02 +0000
commit3aef6c6a54e85ac5cc5e004669404d71be22aafb (patch)
tree2b3e84cab32e07bc2712111531be89743fa5fe87 /src/librustdoc/clean
parent30b6fe37a6d447a647f2608562aff7b1758bce54 (diff)
downloadrust-3aef6c6a54e85ac5cc5e004669404d71be22aafb.tar.gz
rust-3aef6c6a54e85ac5cc5e004669404d71be22aafb.zip
roll another resolution logic in rustdoc
Diffstat (limited to 'src/librustdoc/clean')
-rw-r--r--src/librustdoc/clean/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index ad4ad4104e1..7a77aedbccf 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -1381,7 +1381,8 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type
                 ty::Projection(proj) => Res::Def(DefKind::Trait, proj.trait_ref(cx.tcx).def_id),
                 // Rustdoc handles `ty::Error`s by turning them into `Type::Infer`s.
                 ty::Error(_) => return Type::Infer,
-                _ => bug!("clean: expected associated type, found `{:?}`", ty),
+                // Otherwise, this is an inherent associated type.
+                _ => return clean_middle_ty(ty, cx, None),
             };
             let trait_ = clean_path(&hir::Path { span, res, segments: &[] }, cx);
             register_res(cx, trait_.res);