mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
rename AdtDef -> Adt
This commit is contained in:
parent
bcf30d389c
commit
114a1b878e
20 changed files with 90 additions and 99 deletions
|
@ -15,7 +15,7 @@ use crate::{
|
|||
name::{Name, SELF_PARAM, SELF_TYPE},
|
||||
nameres::{CrateDefMap, CrateModuleId, PerNs},
|
||||
path::Path,
|
||||
AdtDef, Enum, MacroDef, ModuleDef, Struct, Trait,
|
||||
Adt, Enum, MacroDef, ModuleDef, Struct, Trait,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
|
@ -143,7 +143,7 @@ impl Resolver {
|
|||
) -> Option<Struct> {
|
||||
let res = self.resolve_path_segments(db, path).into_fully_resolved().take_types()?;
|
||||
match res {
|
||||
Resolution::Def(ModuleDef::AdtDef(AdtDef::Struct(it))) => Some(it),
|
||||
Resolution::Def(ModuleDef::Adt(Adt::Struct(it))) => Some(it),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ impl Resolver {
|
|||
pub(crate) fn resolve_known_enum(&self, db: &impl HirDatabase, path: &Path) -> Option<Enum> {
|
||||
let res = self.resolve_path_segments(db, path).into_fully_resolved().take_types()?;
|
||||
match res {
|
||||
Resolution::Def(ModuleDef::AdtDef(AdtDef::Enum(it))) => Some(it),
|
||||
Resolution::Def(ModuleDef::Adt(Adt::Enum(it))) => Some(it),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue