Resolve derive attributes even when shadowed

This commit is contained in:
Lukas Wirth 2021-10-19 13:40:27 +02:00
parent 401daa5f77
commit aa9d093488
3 changed files with 23 additions and 7 deletions

View file

@ -502,6 +502,15 @@ pub(crate) fn resolve_hir_path(
resolve_hir_path_(db, resolver, path, false)
}
#[inline]
pub(crate) fn resolve_hir_path_as_macro(
db: &dyn HirDatabase,
resolver: &Resolver,
path: &Path,
) -> Option<MacroDef> {
resolver.resolve_path_as_macro(db.upcast(), path.mod_path()).map(Into::into)
}
fn resolve_hir_path_(
db: &dyn HirDatabase,
resolver: &Resolver,