Keep the previous behavior of register_res
Now that we're returning the `Res` of the associated item, not the trait itself, it got confused.
This commit is contained in:
parent
519c85439a
commit
743f932742
1 changed files with 3 additions and 0 deletions
|
|
@ -607,6 +607,9 @@ pub fn register_res(cx: &DocContext<'_>, res: Res) -> DefId {
|
|||
Res::Def(DefKind::TyAlias, i) => (i, TypeKind::Typedef),
|
||||
Res::Def(DefKind::Enum, i) => (i, TypeKind::Enum),
|
||||
Res::Def(DefKind::Trait, i) => (i, TypeKind::Trait),
|
||||
Res::Def(DefKind::AssocTy | DefKind::AssocFn | DefKind::AssocConst, i) => {
|
||||
(cx.tcx.parent(i).unwrap(), TypeKind::Trait)
|
||||
}
|
||||
Res::Def(DefKind::Struct, i) => (i, TypeKind::Struct),
|
||||
Res::Def(DefKind::Union, i) => (i, TypeKind::Union),
|
||||
Res::Def(DefKind::Mod, i) => (i, TypeKind::Module),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue