about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-02-28 15:21:41 -0800
committerbors <bors@rust-lang.org>2013-02-28 15:21:41 -0800
commit5680ec027088c57f8b9fa3a9aa91daaf2428a57c (patch)
treee66d0dc80f778fb399c83a36d6acd88ea001186b /src/libsyntax/parse
parent0d30af1ebe4a803d86f47106c90ec0dc20a9d024 (diff)
parent2df07ddc250b64151401e9b8569a6c7ad5c9b34f (diff)
downloadrust-5680ec027088c57f8b9fa3a9aa91daaf2428a57c.tar.gz
rust-5680ec027088c57f8b9fa3a9aa91daaf2428a57c.zip
auto merge of #5113 : alexcrichton/rust/issue-4366, r=catamorphism
The first two commits are the actual fix going into place, and the last is just dealing with the fallout in the rest of the compiler.

The test added in the first two commits had 0 failures before this patch, and if the glob imports were changed to explicit imports then the errors showed up. Due to this behavior, I figured that the desired behavior was for glob imports to not accidentally leak a lot of non-public imports/functions/types into other modules.

There was quite a lot of fallout, and it all passes `make check` locally, but I doubt that it will pass on all platforms because there's probably some guarded off thing I missed.

I plan on making another patch soon which changes the default level of `unused_imports` to `warn` which will hopefully reduce a lot of the `use` noise throughout. In conjunction with #5104, and a few minor fixes, I think that the default level of `warn` is actually really usable.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/attr.rs1
-rw-r--r--src/libsyntax/parse/lexer.rs8
-rw-r--r--src/libsyntax/parse/mod.rs2
-rw-r--r--src/libsyntax/parse/prec.rs1
4 files changed, 10 insertions, 2 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index c0c97a0b9eb..b5c4ff3ddd7 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -15,6 +15,7 @@ use codemap::spanned;
 use codemap::BytePos;
 use parse::common::*; //resolve bug?
 use parse::token;
+use parse::parser::Parser;
 
 use core::either::{Either, Left, Right};
 
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs
index dc5bdeba92a..c928719c208 100644
--- a/src/libsyntax/parse/lexer.rs
+++ b/src/libsyntax/parse/lexer.rs
@@ -764,10 +764,14 @@ fn consume_whitespace(rdr: @mut StringReader) {
 
 #[cfg(test)]
 pub mod test {
-
     use super::*;
-    use util::interner;
+
+    use ast;
+    use codemap::{BytePos, CodeMap, span};
+    use core::option::None;
     use diagnostic;
+    use parse::token;
+    use util::interner;
     use util::testing::{check_equal, check_equal_ptr};
 
     // represents a testing reader (incl. both reader and interner)
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index a31a73f594a..057412fcd7e 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -234,6 +234,8 @@ mod test {
     use super::*;
     use std::serialize::Encodable;
     use std;
+    use core::io;
+    use core::option::None;
     use core::str;
     use util::testing::*;
 
diff --git a/src/libsyntax/parse/prec.rs b/src/libsyntax/parse/prec.rs
index fff222876aa..e2a89d2a28c 100644
--- a/src/libsyntax/parse/prec.rs
+++ b/src/libsyntax/parse/prec.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use ast;
 use ast::*;
 use parse::token::*;
 use parse::token::Token;