mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Merge pull request #20217 from ChayimFriedman2/spec-resolve-hygiene
fix: Use root hygiene for speculative resolution
This commit is contained in:
@@ -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},
|
||||
@@ -53,7 +53,7 @@
|
||||
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(());
|
||||
@@ -2330,7 +2330,7 @@ pub fn speculative_resolve(&self, ast_path: &ast::Path) -> Option<PathResolution
|
||||
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,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user