@@ -18,7 +18,7 @@ use {names_to_string, module_to_string};
18
18
use { resolve_error, ResolutionError } ;
19
19
20
20
use rustc:: ty;
21
- use rustc:: lint:: builtin:: PRIVATE_IN_PUBLIC ;
21
+ use rustc:: lint:: builtin:: PUB_USE_OF_PRIVATE_EXTERN_CRATE ;
22
22
use rustc:: hir:: def_id:: DefId ;
23
23
use rustc:: hir:: def:: * ;
24
24
use rustc:: util:: nodemap:: FxHashMap ;
@@ -296,7 +296,8 @@ impl<'a> Resolver<'a> {
296
296
pub fn import ( & self , binding : & ' a NameBinding < ' a > , directive : & ' a ImportDirective < ' a > )
297
297
-> & ' a NameBinding < ' a > {
298
298
let vis = if binding. pseudo_vis ( ) . is_at_least ( directive. vis . get ( ) , self ) ||
299
- !directive. is_glob ( ) && binding. is_extern_crate ( ) { // c.f. `PRIVATE_IN_PUBLIC`
299
+ // c.f. `PUB_USE_OF_PRIVATE_EXTERN_CRATE`
300
+ !directive. is_glob ( ) && binding. is_extern_crate ( ) {
300
301
directive. vis . get ( )
301
302
} else {
302
303
binding. pseudo_vis ( )
@@ -735,7 +736,8 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
735
736
let msg = format ! ( "extern crate `{}` is private, and cannot be reexported \
736
737
(error E0365), consider declaring with `pub`",
737
738
ident) ;
738
- self . session . add_lint ( PRIVATE_IN_PUBLIC , directive. id , directive. span , msg) ;
739
+ self . session . add_lint ( PUB_USE_OF_PRIVATE_EXTERN_CRATE ,
740
+ directive. id , directive. span , msg) ;
739
741
} else if ns == TypeNS {
740
742
struct_span_err ! ( self . session, directive. span, E0365 ,
741
743
"`{}` is private, and cannot be reexported" , ident)
0 commit comments