@@ -396,14 +396,11 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> {
396396 for ( i, resolution) in entry. resolutions . iter_mut ( ) . enumerate ( ) {
397397 if resolution. exts . is_none ( ) {
398398 resolution. exts = Some (
399- match self . cm ( ) . resolve_macro_path (
399+ match self . cm ( ) . resolve_derive_macro_path (
400400 & resolution. path ,
401- MacroKind :: Derive ,
402401 & parent_scope,
403- true ,
404402 force,
405403 None ,
406- None ,
407404 ) {
408405 Ok ( ( Some ( ext) , _) ) => {
409406 if !ext. helper_attrs . is_empty ( ) {
@@ -571,7 +568,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
571568 path,
572569 kind,
573570 parent_scope,
574- true ,
575571 force,
576572 deleg_impl,
577573 invoc_in_mod_inert_attr. map ( |def_id| ( def_id, node_id) ) ,
@@ -713,26 +709,22 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
713709 Ok ( ( ext, res) )
714710 }
715711
716- pub ( crate ) fn resolve_macro_path < ' r > (
712+ pub ( crate ) fn resolve_derive_macro_path < ' r > (
717713 self : CmResolver < ' r , ' ra , ' tcx > ,
718714 path : & ast:: Path ,
719- kind : MacroKind ,
720715 parent_scope : & ParentScope < ' ra > ,
721- trace : bool ,
722716 force : bool ,
723717 ignore_import : Option < Import < ' ra > > ,
724- suggestion_span : Option < Span > ,
725718 ) -> Result < ( Option < Arc < SyntaxExtension > > , Res ) , Determinacy > {
726719 self . resolve_macro_or_delegation_path (
727720 path,
728- kind ,
721+ MacroKind :: Derive ,
729722 parent_scope,
730- trace,
731723 force,
732724 None ,
733725 None ,
734726 ignore_import,
735- suggestion_span ,
727+ None ,
736728 )
737729 }
738730
@@ -741,7 +733,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
741733 ast_path : & ast:: Path ,
742734 kind : MacroKind ,
743735 parent_scope : & ParentScope < ' ra > ,
744- trace : bool ,
745736 force : bool ,
746737 deleg_impl : Option < LocalDefId > ,
747738 invoc_in_mod_inert_attr : Option < ( LocalDefId , NodeId ) > ,
@@ -780,16 +771,14 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
780771 PathResult :: Module ( ..) => unreachable ! ( ) ,
781772 } ;
782773
783- if trace {
784- self . multi_segment_macro_resolutions . borrow_mut ( & self ) . push ( (
785- path,
786- path_span,
787- kind,
788- * parent_scope,
789- res. ok ( ) ,
790- ns,
791- ) ) ;
792- }
774+ self . multi_segment_macro_resolutions . borrow_mut ( & self ) . push ( (
775+ path,
776+ path_span,
777+ kind,
778+ * parent_scope,
779+ res. ok ( ) ,
780+ ns,
781+ ) ) ;
793782
794783 self . prohibit_imported_non_macro_attrs ( None , res. ok ( ) , path_span) ;
795784 res
@@ -807,15 +796,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
807796 return Err ( Determinacy :: Undetermined ) ;
808797 }
809798
810- if trace {
811- self . single_segment_macro_resolutions . borrow_mut ( & self ) . push ( (
812- path[ 0 ] . ident ,
813- kind,
814- * parent_scope,
815- binding. ok ( ) ,
816- suggestion_span,
817- ) ) ;
818- }
799+ self . single_segment_macro_resolutions . borrow_mut ( & self ) . push ( (
800+ path[ 0 ] . ident ,
801+ kind,
802+ * parent_scope,
803+ binding. ok ( ) ,
804+ suggestion_span,
805+ ) ) ;
819806
820807 let res = binding. map ( |binding| binding. res ( ) ) ;
821808 self . prohibit_imported_non_macro_attrs ( binding. ok ( ) , res. ok ( ) , path_span) ;
0 commit comments