about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-02-25 11:41:01 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-02-25 11:41:01 +0530
commita48f95879d4a6a62176ad37910782ede9f24f30f (patch)
treecdb69410cf6c77f1e25f256c4bb98aa361f8d7ba /src/libsyntax/parse
parentf6f050d09003a4c7895f44fed3a7c6cdce8f2949 (diff)
parent7ad7065c35e6ec0881f917e2fea3615f1dfeaed3 (diff)
Rollup merge of #31362 - jseyfried:fix_extern_crate_visibility, r=nikomatsakis
This PR changes the visibility of extern crate declarations to match that of items (fixes #26775).
To avoid breakage, the PR makes it a `public_in_private` lint to reexport a private extern crate, and it adds the lint `inaccessible_extern_crate` for uses of an inaccessible extern crate.

The lints can be avoided by making the appropriate `extern crate` declaration public.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index d65a5e56b90..b5d29a0d6db 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -5487,13 +5487,6 @@ impl<'a> Parser<'a> {
         try!(self.expect(&token::Semi));
 
         let last_span = self.last_span;
-
-        if visibility == ast::Visibility::Public {
-            self.span_warn(mk_sp(lo, last_span.hi),
-                           "`pub extern crate` does not work as expected and should not be used. \
-                            Likely to become an error. Prefer `extern crate` and `pub use`.");
-        }
-
         Ok(self.mk_item(lo,
                         last_span.hi,
                         ident,