@@ -193,7 +193,7 @@ impl<'a> base::Resolver for Resolver<'a> {
193
193
fn find_attr_invoc ( & mut self , attrs : & mut Vec < ast:: Attribute > ) -> Option < ast:: Attribute > {
194
194
for i in 0 ..attrs. len ( ) {
195
195
match self . builtin_macros . get ( & attrs[ i] . name ( ) ) . cloned ( ) {
196
- Some ( binding) => match * self . get_macro ( binding ) {
196
+ Some ( binding) => match * binding . get_macro ( self ) {
197
197
MultiModifier ( ..) | MultiDecorator ( ..) | SyntaxExtension :: AttrProcMacro ( ..) => {
198
198
return Some ( attrs. remove ( i) )
199
199
}
@@ -215,11 +215,11 @@ impl<'a> base::Resolver for Resolver<'a> {
215
215
216
216
let invocation = self . invocations [ & scope] ;
217
217
self . current_module = invocation. module . get ( ) ;
218
- let result = match self . resolve_legacy_scope ( & invocation. legacy_scope , name, false ) {
219
- Some ( MacroBinding :: Legacy ( binding) ) => Ok ( binding. ext . clone ( ) ) ,
220
- Some ( MacroBinding :: Modern ( binding) ) => Ok ( self . get_macro ( binding ) ) ,
218
+ let ext = match self . resolve_legacy_scope ( & invocation. legacy_scope , name, false ) {
219
+ Some ( MacroBinding :: Legacy ( binding) ) => binding. ext . clone ( ) ,
220
+ Some ( MacroBinding :: Modern ( binding) ) => binding . get_macro ( self ) ,
221
221
None => match self . resolve_in_item_lexical_scope ( name, MacroNS , None ) {
222
- Some ( binding) => Ok ( self . get_macro ( binding ) ) ,
222
+ Some ( binding) => binding . get_macro ( self ) ,
223
223
None => return Err ( if force {
224
224
let msg = format ! ( "macro undefined: '{}!'" , name) ;
225
225
let mut err = self . session . struct_span_err ( path. span , & msg) ;
@@ -236,7 +236,7 @@ impl<'a> base::Resolver for Resolver<'a> {
236
236
self . current_module . legacy_macro_resolutions . borrow_mut ( )
237
237
. push ( ( scope, name, path. span ) ) ;
238
238
}
239
- result
239
+ Ok ( ext )
240
240
}
241
241
}
242
242
0 commit comments