mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Add currently unused UseId variants
This commit is contained in:
parent
f86f6a89eb
commit
ecb6d07d57
9 changed files with 34 additions and 4 deletions
|
@ -95,7 +95,7 @@ use hir_def::{
|
|||
hir::{BindingId, LabelId},
|
||||
AdtId, ConstId, ConstParamId, DefWithBodyId, EnumId, EnumVariantId, ExternCrateId, FieldId,
|
||||
FunctionId, GenericDefId, GenericParamId, ImplId, LifetimeParamId, MacroId, ModuleId, StaticId,
|
||||
StructId, TraitAliasId, TraitId, TypeAliasId, TypeParamId, UnionId, VariantId,
|
||||
StructId, TraitAliasId, TraitId, TypeAliasId, TypeParamId, UnionId, UseId, VariantId,
|
||||
};
|
||||
use hir_expand::{attrs::AttrId, name::AsName, HirFileId, MacroCallId};
|
||||
use rustc_hash::FxHashMap;
|
||||
|
@ -209,6 +209,10 @@ impl SourceToDefCtx<'_, '_> {
|
|||
) -> Option<ExternCrateId> {
|
||||
self.to_def(src, keys::EXTERN_CRATE)
|
||||
}
|
||||
#[allow(dead_code)]
|
||||
pub(super) fn use_to_def(&mut self, src: InFile<ast::Use>) -> Option<UseId> {
|
||||
self.to_def(src, keys::USE)
|
||||
}
|
||||
pub(super) fn adt_to_def(
|
||||
&mut self,
|
||||
InFile { file_id, value }: InFile<ast::Adt>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue