@@ -18,7 +18,7 @@ use {names_to_string, module_to_string};
1818use { resolve_error, ResolutionError } ;
1919
2020use rustc:: ty;
21- use rustc:: lint:: builtin:: PRIVATE_IN_PUBLIC ;
21+ use rustc:: lint:: builtin:: PUB_USE_OF_PRIVATE_EXTERN_CRATE ;
2222use rustc:: hir:: def_id:: DefId ;
2323use rustc:: hir:: def:: * ;
2424use rustc:: util:: nodemap:: FxHashMap ;
@@ -296,7 +296,8 @@ impl<'a> Resolver<'a> {
296296 pub fn import ( & self , binding : & ' a NameBinding < ' a > , directive : & ' a ImportDirective < ' a > )
297297 -> & ' a NameBinding < ' a > {
298298 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 ( ) {
300301 directive. vis . get ( )
301302 } else {
302303 binding. pseudo_vis ( )
@@ -735,7 +736,8 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
735736 let msg = format ! ( "extern crate `{}` is private, and cannot be reexported \
736737 (error E0365), consider declaring with `pub`",
737738 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) ;
739741 } else if ns == TypeNS {
740742 struct_span_err ! ( self . session, directive. span, E0365 ,
741743 "`{}` is private, and cannot be reexported" , ident)
0 commit comments