From d36e3be256a0a31bac890855286fce23729b6278 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Thu, 10 Jul 2025 01:22:19 +0300 Subject: [PATCH] Use root hygiene for speculative resolution Instead of the hygiene what happens to be in the same fake range. --- src/tools/rust-analyzer/crates/hir/src/semantics.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/rust-analyzer/crates/hir/src/semantics.rs b/src/tools/rust-analyzer/crates/hir/src/semantics.rs index 247bb6939831..f2eb1b996c23 100644 --- a/src/tools/rust-analyzer/crates/hir/src/semantics.rs +++ b/src/tools/rust-analyzer/crates/hir/src/semantics.rs @@ -13,7 +13,7 @@ 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 @@ 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 = ControlFlow::Continue(()); @@ -2288,7 +2288,7 @@ pub fn speculative_resolve(&self, ast_path: &ast::Path) -> Option