mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Wrap BuiltinType
in code model
This commit is contained in:
parent
b0f20a795d
commit
216dc856c5
9 changed files with 56 additions and 28 deletions
|
@ -28,8 +28,9 @@ use syntax::{
|
|||
};
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase, semantics::PathResolution, Adt, Const, Field, Function, Local, MacroDef,
|
||||
ModuleDef, Static, Struct, Trait, Type, TypeAlias, TypeParam, Variant,
|
||||
code_model::BuiltinType, db::HirDatabase, semantics::PathResolution, Adt, Const, Field,
|
||||
Function, Local, MacroDef, ModuleDef, Static, Struct, Trait, Type, TypeAlias, TypeParam,
|
||||
Variant,
|
||||
};
|
||||
use base_db::CrateId;
|
||||
|
||||
|
@ -479,7 +480,7 @@ fn resolve_hir_path_(
|
|||
}
|
||||
TypeNs::EnumVariantId(it) => PathResolution::Def(Variant::from(it).into()),
|
||||
TypeNs::TypeAliasId(it) => PathResolution::Def(TypeAlias::from(it).into()),
|
||||
TypeNs::BuiltinType(it) => PathResolution::Def(it.into()),
|
||||
TypeNs::BuiltinType(it) => PathResolution::Def(BuiltinType::from(it).into()),
|
||||
TypeNs::TraitId(it) => PathResolution::Def(Trait::from(it).into()),
|
||||
})
|
||||
};
|
||||
|
@ -555,7 +556,7 @@ fn resolve_hir_path_qualifier(
|
|||
TypeNs::AdtSelfType(it) | TypeNs::AdtId(it) => PathResolution::Def(Adt::from(it).into()),
|
||||
TypeNs::EnumVariantId(it) => PathResolution::Def(Variant::from(it).into()),
|
||||
TypeNs::TypeAliasId(it) => PathResolution::Def(TypeAlias::from(it).into()),
|
||||
TypeNs::BuiltinType(it) => PathResolution::Def(it.into()),
|
||||
TypeNs::BuiltinType(it) => PathResolution::Def(BuiltinType::from(it).into()),
|
||||
TypeNs::TraitId(it) => PathResolution::Def(Trait::from(it).into()),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue