resolve: Make bindings for derive helper attributes unique

instead of creating them every time such attribute is used
This commit is contained in:
Vadim Petrochenkov
2023-08-22 19:14:32 +08:00
parent 02640f9d59
commit 50bbe01de0
4 changed files with 25 additions and 28 deletions

View File

@@ -1047,7 +1047,7 @@ pub struct Resolver<'a, 'tcx> {
/// `macro_rules` scopes produced by `macro_rules` item definitions.
macro_rules_scopes: FxHashMap<LocalDefId, MacroRulesScopeRef<'a>>,
/// Helper attributes that are in scope for the given expansion.
helper_attrs: FxHashMap<LocalExpnId, Vec<Ident>>,
helper_attrs: FxHashMap<LocalExpnId, Vec<(Ident, NameBinding<'a>)>>,
/// Ready or in-progress results of resolving paths inside the `#[derive(...)]` attribute
/// with the given `ExpnId`.
derive_data: FxHashMap<LocalExpnId, DeriveData>,