@@ -431,9 +431,11 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> {
431
431
value_result = BoundResult ( target_module. clone ( ) ,
432
432
( * child_name_bindings) . clone ( ) ) ;
433
433
if directive. is_public && !child_name_bindings. is_public ( ValueNS ) {
434
- let msg = format ! ( "`{}` is private, and cannot be reexported" , token:: get_name( source) ) ;
435
- let note_msg = format ! ( "Consider marking `{}` as pub in the imported module" ,
436
- token:: get_name( source) ) ;
434
+ let msg = format ! ( "`{}` is private, and cannot be reexported" ,
435
+ token:: get_name( source) ) ;
436
+ let note_msg =
437
+ format ! ( "Consider marking `{}` as `pub` in the imported module" ,
438
+ token:: get_name( source) ) ;
437
439
span_err ! ( self . resolver. session, directive. span, E0364 , "{}" , & msg) ;
438
440
self . resolver . session . span_note ( directive. span , & note_msg) ;
439
441
pub_err = true ;
@@ -444,9 +446,10 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> {
444
446
type_result = BoundResult ( target_module. clone ( ) ,
445
447
( * child_name_bindings) . clone ( ) ) ;
446
448
if !pub_err && directive. is_public && !child_name_bindings. is_public ( TypeNS ) {
447
- let msg = format ! ( "`{}` is private, and cannot be reexported" , token:: get_name( source) ) ;
448
- let note_msg = format ! ( "Consider changing module {} so that it is declared as `pub mod`" ,
449
- token:: get_name( source) ) ;
449
+ let msg = format ! ( "`{}` is private, and cannot be reexported" ,
450
+ token:: get_name( source) ) ;
451
+ let note_msg = format ! ( "Consider declaring module {} as `pub mod`" ,
452
+ token:: get_name( source) ) ;
450
453
span_err ! ( self . resolver. session, directive. span, E0365 , "{}" , & msg) ;
451
454
self . resolver . session . span_note ( directive. span , & note_msg) ;
452
455
}
0 commit comments