mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Move attrs query to hir_def
This commit is contained in:
parent
81bfbd26be
commit
552ba868af
10 changed files with 202 additions and 123 deletions
|
@ -5,13 +5,13 @@
|
|||
|
||||
use hir_def::{
|
||||
AdtId, AssocItemId, ConstId, DefWithBodyId, EnumId, EnumVariantId, FunctionId, GenericDefId,
|
||||
ModuleDefId, StaticId, StructId, TypeAliasId, UnionId, VariantId,
|
||||
ModuleDefId, StaticId, StructFieldId, StructId, TypeAliasId, UnionId, VariantId,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
ty::{CallableDef, TypableDef},
|
||||
Adt, AssocItem, Const, Crate, DefWithBody, EnumVariant, Function, GenericDef, ModuleDef,
|
||||
Static, TypeAlias, VariantDef,
|
||||
Static, StructField, TypeAlias, VariantDef,
|
||||
};
|
||||
|
||||
impl From<ra_db::CrateId> for Crate {
|
||||
|
@ -234,3 +234,9 @@ impl From<VariantDef> for VariantId {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<StructField> for StructFieldId {
|
||||
fn from(def: StructField) -> Self {
|
||||
StructFieldId { parent: def.parent.into(), local_id: def.id }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue