@@ -115,23 +115,18 @@ impl<'a> base::Resolver for Resolver<'a> {
115
115
} ) ;
116
116
}
117
117
118
+
119
+
118
120
fn visit_ast_fragment_with_placeholders (
119
121
& mut self , expansion : ExpnId , fragment : & AstFragment , derives : & [ ExpnId ]
120
122
) {
121
- // Fill in some data for derives if the fragment is from a derive container .
123
+ // Integrate the new AST fragment into all the definition and module structures .
122
124
// We are inside the `expansion` now, but other parent scope components are still the same.
123
125
let parent_scope = ParentScope { expansion, ..self . invocation_parent_scopes [ & expansion] } ;
124
- let parent_def = self . definitions . invocation_parent ( expansion) ;
125
- self . invocation_parent_scopes . extend ( derives. iter ( ) . map ( |& derive| ( derive, parent_scope) ) ) ;
126
- for & derive_invoc_id in derives {
127
- self . definitions . set_invocation_parent ( derive_invoc_id, parent_def) ;
128
- }
129
- parent_scope. module . unresolved_invocations . borrow_mut ( ) . remove ( & expansion) ;
130
- parent_scope. module . unresolved_invocations . borrow_mut ( ) . extend ( derives) ;
131
-
132
- // Integrate the new AST fragment into all the definition and module structures.
133
- let output_legacy_scope = self . build_reduced_graph ( fragment, parent_scope) ;
126
+ let output_legacy_scope = self . build_reduced_graph ( fragment, derives, parent_scope) ;
134
127
self . output_legacy_scopes . insert ( expansion, output_legacy_scope) ;
128
+
129
+ parent_scope. module . unresolved_invocations . borrow_mut ( ) . remove ( & expansion) ;
135
130
}
136
131
137
132
fn register_builtin_macro ( & mut self , ident : ast:: Ident , ext : SyntaxExtension ) {
0 commit comments