Unnamed repository; edit this file 'description' to name the repository.
Use root hygiene for speculative resolution
Instead of the hygiene what happens to be in the same fake range.
Chayim Refael Friedman 10 months ago
parent 3816d0a · commit 1a98f3d
-rw-r--r--crates/hir/src/semantics.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs
index 247bb69398..f2eb1b996c 100644
--- a/crates/hir/src/semantics.rs
+++ b/crates/hir/src/semantics.rs
@@ -13,7 +13,7 @@ use std::{
use either::Either;
use hir_def::{
DefWithBodyId, FunctionId, MacroId, StructId, TraitId, VariantId,
- expr_store::{Body, ExprOrPatSource, path::Path},
+ expr_store::{Body, ExprOrPatSource, HygieneId, path::Path},
hir::{BindingId, Expr, ExprId, ExprOrPatId, Pat},
nameres::{ModuleOrigin, crate_def_map},
resolver::{self, HasResolver, Resolver, TypeNs},
@@ -50,7 +50,7 @@ use crate::{
Type, TypeAlias, TypeParam, Union, Variant, VariantDef,
db::HirDatabase,
semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx},
- source_analyzer::{SourceAnalyzer, name_hygiene, resolve_hir_path},
+ source_analyzer::{SourceAnalyzer, resolve_hir_path},
};
const CONTINUE_NO_BREAKS: ControlFlow<Infallible, ()> = ControlFlow::Continue(());
@@ -2288,7 +2288,7 @@ impl<'db> SemanticsScope<'db> {
self.db,
&self.resolver,
&Path::BarePath(Interned::new(ModPath::from_segments(kind, segments))),
- name_hygiene(self.db, InFile::new(self.file_id, ast_path.syntax())),
+ HygieneId::ROOT,
None,
)
}