@@ -389,6 +389,7 @@ struct PrivacyVisitor<'a, 'tcx: 'a> {
389
389
external_exports : ExternalExports ,
390
390
}
391
391
392
+ #[ derive( Debug ) ]
392
393
enum PrivacyResult {
393
394
Allowable ,
394
395
ExternallyDenied ,
@@ -645,9 +646,17 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> {
645
646
/// Guarantee that a particular definition is public. Returns a CheckResult
646
647
/// which contains any errors found. These can be reported using `report_error`.
647
648
/// If the result is `None`, no errors were found.
648
- fn ensure_public ( & self , span : Span , to_check : DefId ,
649
- source_did : Option < DefId > , msg : & str ) -> CheckResult {
650
- let id = match self . def_privacy ( to_check) {
649
+ fn ensure_public ( & self ,
650
+ span : Span ,
651
+ to_check : DefId ,
652
+ source_did : Option < DefId > ,
653
+ msg : & str )
654
+ -> CheckResult {
655
+ debug ! ( "ensure_public(span={:?}, to_check={:?}, source_did={:?}, msg={:?})" ,
656
+ span, to_check, source_did, msg) ;
657
+ let def_privacy = self . def_privacy ( to_check) ;
658
+ debug ! ( "ensure_public: def_privacy={:?}" , def_privacy) ;
659
+ let id = match def_privacy {
651
660
ExternallyDenied => {
652
661
return Some ( ( span, format ! ( "{} is private" , msg) , None ) )
653
662
}
0 commit comments