@@ -538,12 +538,14 @@ impl AuditFile {
538538 crate_path : & FilePath ,
539539 relevant_effects : & [ EffectType ] ,
540540 quick_mode : bool ,
541+ expand_macro : bool ,
541542 ) -> Result < AuditFile > {
542543 Self :: new_caller_checked_default_with_sinks (
543544 crate_path,
544545 HashSet :: new ( ) ,
545546 relevant_effects,
546547 quick_mode,
548+ expand_macro,
547549 )
548550 }
549551
@@ -567,13 +569,14 @@ impl AuditFile {
567569 sinks : HashSet < CanonicalPath > ,
568570 relevant_effects : & [ EffectType ] ,
569571 quick : bool ,
572+ expand_macro : bool ,
570573 ) -> Result < AuditFile > {
571574 Self :: new_caller_checked_default_with_sinks_and_results (
572575 crate_path,
573576 sinks,
574577 relevant_effects,
575578 quick,
576- false ,
579+ expand_macro ,
577580 )
578581 . map ( |x| x. 0 )
579582 }
@@ -621,6 +624,7 @@ impl AuditFile {
621624 sinks : HashSet < CanonicalPath > ,
622625 relevant_effects : & [ EffectType ] ,
623626 quick : bool ,
627+ expand_macro : bool ,
624628 ) -> Result < AuditFile > {
625629 let mut audit_file =
626630 AuditFile :: empty ( crate_path. to_path_buf ( ) , relevant_effects. to_vec ( ) ) ?;
@@ -631,7 +635,7 @@ impl AuditFile {
631635 ident_sinks,
632636 relevant_effects,
633637 quick,
634- false ,
638+ expand_macro ,
635639 ) ?;
636640 audit_file. set_base_audit_trees ( scan_res. effects_set ( ) ) ;
637641
@@ -643,9 +647,15 @@ impl AuditFile {
643647 sinks : HashSet < CanonicalPath > ,
644648 relevant_effects : & [ EffectType ] ,
645649 quick : bool ,
650+ expand_macro : bool ,
646651 ) -> Result < AuditFile > {
647- let ( mut audit_file, _scan_res) =
648- Self :: scan_with_sinks ( crate_path, sinks, relevant_effects, quick, false ) ?;
652+ let ( mut audit_file, _scan_res) = Self :: scan_with_sinks (
653+ crate_path,
654+ sinks,
655+ relevant_effects,
656+ quick,
657+ expand_macro,
658+ ) ?;
649659 for ( _, mut t) in audit_file. audit_trees . iter_mut ( ) {
650660 if let EffectTree :: Leaf ( _, a) = & mut t {
651661 * a = SafetyAnnotation :: Safe ;
@@ -661,6 +671,7 @@ impl AuditFile {
661671 audit_type : DefaultAuditType ,
662672 relevant_effects : & [ EffectType ] ,
663673 quick : bool ,
674+ expand_macro : bool ,
664675 ) -> Result < AuditFile > {
665676 match audit_type {
666677 DefaultAuditType :: CallerChecked => {
@@ -669,19 +680,22 @@ impl AuditFile {
669680 sinks,
670681 relevant_effects,
671682 quick,
683+ expand_macro,
672684 )
673685 }
674686 DefaultAuditType :: Empty => Self :: new_empty_default_with_sinks (
675687 crate_path,
676688 sinks,
677689 relevant_effects,
678690 quick,
691+ expand_macro,
679692 ) ,
680693 DefaultAuditType :: Safe => Self :: new_safe_default_with_sinks (
681694 crate_path,
682695 sinks,
683696 relevant_effects,
684697 quick,
698+ expand_macro,
685699 ) ,
686700 }
687701 }
0 commit comments