@@ -803,21 +803,22 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
803
803
if !any_successful_reexport {
804
804
let ( ns, binding) = reexport_error. unwrap ( ) ;
805
805
if ns == TypeNS && binding. is_extern_crate ( ) {
806
- let msg = format ! ( "extern crate `{}` is private, and cannot be reexported \
807
- (error E0365), consider declaring with `pub`",
806
+ let msg = format ! ( "extern crate `{}` is private, and cannot be \
807
+ re-exported (error E0365), consider declaring with \
808
+ `pub`",
808
809
ident) ;
809
810
self . session . buffer_lint ( PUB_USE_OF_PRIVATE_EXTERN_CRATE ,
810
811
directive. id ,
811
812
directive. span ,
812
813
& msg) ;
813
814
} else if ns == TypeNS {
814
815
struct_span_err ! ( self . session, directive. span, E0365 ,
815
- "`{}` is private, and cannot be reexported " , ident)
816
- . span_label ( directive. span , format ! ( "reexport of private `{}`" , ident) )
816
+ "`{}` is private, and cannot be re-exported " , ident)
817
+ . span_label ( directive. span , format ! ( "re-export of private `{}`" , ident) )
817
818
. note ( & format ! ( "consider declaring type or module `{}` with `pub`" , ident) )
818
819
. emit ( ) ;
819
820
} else {
820
- let msg = format ! ( "`{}` is private, and cannot be reexported " , ident) ;
821
+ let msg = format ! ( "`{}` is private, and cannot be re-exported " , ident) ;
821
822
let note_msg =
822
823
format ! ( "consider marking `{}` as `pub` in the imported module" , ident) ;
823
824
struct_span_err ! ( self . session, directive. span, E0364 , "{}" , & msg)
@@ -932,12 +933,12 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
932
933
!orig_binding. vis . is_at_least ( binding. vis , & * self ) {
933
934
let msg = match directive. subclass {
934
935
ImportDirectiveSubclass :: SingleImport { .. } => {
935
- format ! ( "variant `{}` is private and cannot be reexported " ,
936
+ format ! ( "variant `{}` is private and cannot be re-exported " ,
936
937
ident)
937
938
} ,
938
939
ImportDirectiveSubclass :: GlobImport { .. } => {
939
940
let msg = "enum is private and its variants \
940
- cannot be reexported ". to_owned ( ) ;
941
+ cannot be re-exported ". to_owned ( ) ;
941
942
let error_id = ( DiagnosticMessageId :: ErrorId ( 0 ) , // no code?!
942
943
Some ( binding. span ) ,
943
944
msg. clone ( ) ) ;
0 commit comments