@@ -193,7 +193,7 @@ impl<'a> base::Resolver for Resolver<'a> {
193193 fn find_attr_invoc ( & mut self , attrs : & mut Vec < ast:: Attribute > ) -> Option < ast:: Attribute > {
194194 for i in 0 ..attrs. len ( ) {
195195 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 ) {
197197 MultiModifier ( ..) | MultiDecorator ( ..) | SyntaxExtension :: AttrProcMacro ( ..) => {
198198 return Some ( attrs. remove ( i) )
199199 }
@@ -215,11 +215,11 @@ impl<'a> base::Resolver for Resolver<'a> {
215215
216216 let invocation = self . invocations [ & scope] ;
217217 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 ) ,
221221 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 ) ,
223223 None => return Err ( if force {
224224 let msg = format ! ( "macro undefined: '{}!'" , name) ;
225225 let mut err = self . session . struct_span_err ( path. span , & msg) ;
@@ -236,7 +236,7 @@ impl<'a> base::Resolver for Resolver<'a> {
236236 self . current_module . legacy_macro_resolutions . borrow_mut ( )
237237 . push ( ( scope, name, path. span ) ) ;
238238 }
239- result
239+ Ok ( ext )
240240 }
241241}
242242
0 commit comments