mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Lower and handle trait aliases in HIR
This commit is contained in:
parent
e2ec3a6561
commit
29c957f973
47 changed files with 334 additions and 75 deletions
|
@ -14,7 +14,8 @@ use syntax::{ast, AstNode};
|
|||
|
||||
use crate::{
|
||||
Adt, AssocItem, Const, ConstParam, Enum, Field, Function, GenericParam, Impl, LifetimeParam,
|
||||
Macro, Module, ModuleDef, Static, Struct, Trait, TypeAlias, TypeParam, Union, Variant,
|
||||
Macro, Module, ModuleDef, Static, Struct, Trait, TraitAlias, TypeAlias, TypeParam, Union,
|
||||
Variant,
|
||||
};
|
||||
|
||||
pub trait HasAttrs {
|
||||
|
@ -60,6 +61,7 @@ impl_has_attrs![
|
|||
(Static, StaticId),
|
||||
(Const, ConstId),
|
||||
(Trait, TraitId),
|
||||
(TraitAlias, TraitAliasId),
|
||||
(TypeAlias, TypeAliasId),
|
||||
(Macro, MacroId),
|
||||
(Function, FunctionId),
|
||||
|
@ -134,6 +136,7 @@ fn resolve_doc_path(
|
|||
AttrDefId::StaticId(it) => it.resolver(db.upcast()),
|
||||
AttrDefId::ConstId(it) => it.resolver(db.upcast()),
|
||||
AttrDefId::TraitId(it) => it.resolver(db.upcast()),
|
||||
AttrDefId::TraitAliasId(it) => it.resolver(db.upcast()),
|
||||
AttrDefId::TypeAliasId(it) => it.resolver(db.upcast()),
|
||||
AttrDefId::ImplId(it) => it.resolver(db.upcast()),
|
||||
AttrDefId::ExternBlockId(it) => it.resolver(db.upcast()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue