@@ -1055,7 +1055,7 @@ impl DefCollector<'_> {
10551055        } ; 
10561056        let  mut  res = ReachedFixedPoint :: Yes ; 
10571057        macros. retain ( |directive| { 
1058-             let  resolver2  = |path| { 
1058+             let  resolver  = |path| { 
10591059                let  resolved_res = self . def_map . resolve_path_fp_with_macro ( 
10601060                    self . db , 
10611061                    ResolveMode :: Other , 
@@ -1068,7 +1068,7 @@ impl DefCollector<'_> {
10681068                    . take_macros ( ) 
10691069                    . map ( |it| ( it,  macro_id_to_def_id ( self . db ,  it) ) ) 
10701070            } ; 
1071-             let  resolver  = |path| resolver2 ( path) . map ( |( _,  it) | it) ; 
1071+             let  resolver_def_id  = |path| resolver ( path) . map ( |( _,  it) | it) ; 
10721072
10731073            match  & directive. kind  { 
10741074                MacroDirectiveKind :: FnLike  {  ast_id,  expand_to }  => { 
@@ -1077,7 +1077,7 @@ impl DefCollector<'_> {
10771077                        ast_id, 
10781078                        * expand_to, 
10791079                        self . def_map . krate , 
1080-                         & resolver , 
1080+                         & resolver_def_id , 
10811081                        & mut  |_err| ( ) , 
10821082                    ) ; 
10831083                    if  let  Ok ( Ok ( call_id) )  = call_id { 
@@ -1093,7 +1093,7 @@ impl DefCollector<'_> {
10931093                        * derive_attr, 
10941094                        * derive_pos as  u32 , 
10951095                        self . def_map . krate , 
1096-                         & resolver2 , 
1096+                         & resolver , 
10971097                    ) ; 
10981098
10991099                    if  let  Ok ( ( macro_id,  def_id,  call_id) )  = id { 
@@ -1158,7 +1158,7 @@ impl DefCollector<'_> {
11581158                        } 
11591159                    } 
11601160
1161-                     let  def = match  resolver ( path. clone ( ) )  { 
1161+                     let  def = match  resolver_def_id ( path. clone ( ) )  { 
11621162                        Some ( def)  if  def. is_attribute ( )  => def, 
11631163                        _ => return  true , 
11641164                    } ; 
@@ -1292,7 +1292,8 @@ impl DefCollector<'_> {
12921292            true 
12931293        } ) ; 
12941294        // Attribute resolution can add unresolved macro invocations, so concatenate the lists. 
1295-         self . unresolved_macros . extend ( macros) ; 
1295+         macros. extend ( mem:: take ( & mut  self . unresolved_macros ) ) ; 
1296+         self . unresolved_macros  = macros; 
12961297
12971298        for  ( module_id,  depth,  container,  macro_call_id)  in  resolved { 
12981299            self . collect_macro_expansion ( module_id,  macro_call_id,  depth,  container) ; 
0 commit comments