mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Introduce LowerCtx for path lowering
This commit is contained in:
parent
1635d22a35
commit
bdcf6f5658
14 changed files with 172 additions and 80 deletions
|
@ -70,6 +70,7 @@ pub use hir_def::{
|
|||
type_ref::Mutability,
|
||||
};
|
||||
pub use hir_expand::{
|
||||
name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, MacroFile, Origin,
|
||||
hygiene::Hygiene, name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId,
|
||||
MacroFile, Origin,
|
||||
};
|
||||
pub use hir_ty::{display::HirDisplay, CallableDef};
|
||||
|
|
|
@ -224,7 +224,8 @@ impl SourceAnalyzer {
|
|||
}
|
||||
}
|
||||
// This must be a normal source file rather than macro file.
|
||||
let hir_path = crate::Path::from_ast(path.clone())?;
|
||||
let hir_path =
|
||||
crate::Path::from_src(path.clone(), &Hygiene::new(db.upcast(), self.file_id))?;
|
||||
resolve_hir_path(db, &self.resolver, &hir_path)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue