mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Consider macro sub-namespace during name resolution
This commit is contained in:
parent
3203ea896d
commit
f2a35deb50
15 changed files with 236 additions and 36 deletions
|
@ -10,6 +10,7 @@ use hir_def::{
|
|||
hir::Expr,
|
||||
lower::LowerCtx,
|
||||
macro_id_to_def_id,
|
||||
nameres::MacroSubNs,
|
||||
resolver::{self, HasResolver, Resolver, TypeNs},
|
||||
type_ref::Mutability,
|
||||
AsMacroCall, DefWithBodyId, FieldId, FunctionId, MacroId, TraitId, VariantId,
|
||||
|
@ -616,7 +617,7 @@ impl<'db> SemanticsImpl<'db> {
|
|||
let krate = resolver.krate();
|
||||
let macro_call_id = macro_call.as_call_id(self.db.upcast(), krate, |path| {
|
||||
resolver
|
||||
.resolve_path_as_macro(self.db.upcast(), &path)
|
||||
.resolve_path_as_macro(self.db.upcast(), &path, Some(MacroSubNs::Bang))
|
||||
.map(|it| macro_id_to_def_id(self.db.upcast(), it))
|
||||
})?;
|
||||
hir_expand::db::expand_speculative(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue