8186: Lower traits to `TraitRef` instead of `TypeRef` r=matklad a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
bors[bot] 2021-03-30 16:45:05 +00:00 committed by GitHub
commit fd7c454d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 100 additions and 40 deletions

View file

@ -237,7 +237,7 @@ fn get_doc_link(db: &RootDatabase, definition: Definition) -> Option<String> {
.and_then(|assoc| match assoc.container(db) {
AssocItemContainer::Trait(t) => Some(t.into()),
AssocItemContainer::Impl(impld) => {
impld.target_ty(db).as_adt().map(|adt| adt.into())
impld.self_ty(db).as_adt().map(|adt| adt.into())
}
})
.unwrap_or_else(|| f.clone().into()),