Skip to content

Commit 3e42012

Browse files
authored
Merge pull request #20217 from ChayimFriedman2/spec-resolve-hygiene
fix: Use root hygiene for speculative resolution
2 parents 83c188a + d36e3be commit 3e42012

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},
@@ -53,7 +53,7 @@ use crate::{
5353
TypeAlias, TypeParam, Union, Variant, VariantDef,
5454
db::HirDatabase,
5555
semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx},
56-
source_analyzer::{SourceAnalyzer, name_hygiene, resolve_hir_path},
56+
source_analyzer::{SourceAnalyzer, resolve_hir_path},
5757
};
5858

5959
const CONTINUE_NO_BREAKS: ControlFlow<Infallible, ()> = ControlFlow::Continue(());
@@ -2330,7 +2330,7 @@ impl<'db> SemanticsScope<'db> {
23302330
self.db,
23312331
&self.resolver,
23322332
&Path::BarePath(Interned::new(ModPath::from_segments(kind, segments))),
2333-
name_hygiene(self.db, InFile::new(self.file_id, ast_path.syntax())),
2333+
HygieneId::ROOT,
23342334
None,
23352335
)
23362336
}

0 commit comments

Comments
 (0)