Skip to content

Commit d36e3be

Browse files
Use root hygiene for speculative resolution
Instead of the hygiene what happens to be in the same fake range.
1 parent 4b506ca commit d36e3be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tools/rust-analyzer/crates/hir/src/semantics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::{
1313
use either::Either;
1414
use hir_def::{
1515
DefWithBodyId, FunctionId, MacroId, StructId, TraitId, VariantId,
16-
expr_store::{Body, ExprOrPatSource, path::Path},
16+
expr_store::{Body, ExprOrPatSource, HygieneId, path::Path},
1717
hir::{BindingId, Expr, ExprId, ExprOrPatId, Pat},
1818
nameres::{ModuleOrigin, crate_def_map},
1919
resolver::{self, HasResolver, Resolver, TypeNs},
@@ -50,7 +50,7 @@ use crate::{
5050
Type, TypeAlias, TypeParam, Union, Variant, VariantDef,
5151
db::HirDatabase,
5252
semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx},
53-
source_analyzer::{SourceAnalyzer, name_hygiene, resolve_hir_path},
53+
source_analyzer::{SourceAnalyzer, resolve_hir_path},
5454
};
5555

5656
const CONTINUE_NO_BREAKS: ControlFlow<Infallible, ()> = ControlFlow::Continue(());
@@ -2288,7 +2288,7 @@ impl<'db> SemanticsScope<'db> {
22882288
self.db,
22892289
&self.resolver,
22902290
&Path::BarePath(Interned::new(ModPath::from_segments(kind, segments))),
2291-
name_hygiene(self.db, InFile::new(self.file_id, ast_path.syntax())),
2291+
HygieneId::ROOT,
22922292
None,
22932293
)
22942294
}

0 commit comments

Comments
 (0)