mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Rename hygiene vars and fields to span_map
This commit is contained in:
parent
6208960c48
commit
ab8f12e169
13 changed files with 85 additions and 83 deletions
|
@ -866,8 +866,8 @@ impl<'db> SemanticsImpl<'db> {
|
|||
|
||||
pub fn resolve_trait(&self, path: &ast::Path) -> Option<Trait> {
|
||||
let analyze = self.analyze(path.syntax())?;
|
||||
let hygiene = self.db.span_map(analyze.file_id);
|
||||
let ctx = LowerCtx::with_hygiene(self.db.upcast(), hygiene);
|
||||
let span_map = self.db.span_map(analyze.file_id);
|
||||
let ctx = LowerCtx::with_span_map(self.db.upcast(), span_map);
|
||||
let hir_path = Path::from_src(path.clone(), &ctx)?;
|
||||
match analyze.resolver.resolve_path_in_type_ns_fully(self.db.upcast(), &hir_path)? {
|
||||
TypeNs::TraitId(id) => Some(Trait { id }),
|
||||
|
|
|
@ -595,7 +595,7 @@ impl SourceAnalyzer {
|
|||
}
|
||||
|
||||
// This must be a normal source file rather than macro file.
|
||||
let ctx = LowerCtx::with_hygiene(db.upcast(), db.span_map(self.file_id));
|
||||
let ctx = LowerCtx::with_span_map(db.upcast(), db.span_map(self.file_id));
|
||||
let hir_path = Path::from_src(path.clone(), &ctx)?;
|
||||
|
||||
// Case where path is a qualifier of a use tree, e.g. foo::bar::{Baz, Qux} where we are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue