diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2022-10-27 17:33:41 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2022-11-03 15:09:02 +0000 |
| commit | 3aef6c6a54e85ac5cc5e004669404d71be22aafb (patch) | |
| tree | 2b3e84cab32e07bc2712111531be89743fa5fe87 /src/librustdoc/clean | |
| parent | 30b6fe37a6d447a647f2608562aff7b1758bce54 (diff) | |
| download | rust-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.rs | 3 |
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); |
