mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
start ra_hir_def crate
This commit is contained in:
parent
120000609a
commit
77f90caf2d
12 changed files with 181 additions and 131 deletions
|
@ -11,7 +11,7 @@ use crate::{
|
|||
db::{AstDatabase, DefDatabase, HirDatabase},
|
||||
ids::{AstItemDef, LocationCtx},
|
||||
name::AsName,
|
||||
Const, Crate, Enum, EnumVariant, FieldSource, Function, HasSource, ImplBlock, Module,
|
||||
AstId, Const, Crate, Enum, EnumVariant, FieldSource, Function, HasSource, ImplBlock, Module,
|
||||
ModuleSource, Source, Static, Struct, StructField, Trait, TypeAlias, Union, VariantDef,
|
||||
};
|
||||
|
||||
|
@ -183,7 +183,7 @@ impl Module {
|
|||
ModuleSource::Module(ref module) => {
|
||||
assert!(!module.has_semi());
|
||||
let ast_id_map = db.ast_id_map(src.file_id);
|
||||
let item_id = ast_id_map.ast_id(module).with_file_id(src.file_id);
|
||||
let item_id = AstId::new(src.file_id, ast_id_map.ast_id(module));
|
||||
Some(item_id)
|
||||
}
|
||||
ModuleSource::SourceFile(_) => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue