From 2df07ddc250b64151401e9b8569a6c7ad5c9b34f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 25 Feb 2013 14:11:21 -0500 Subject: Fix implicit leaks of imports throughout libraries Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub' --- src/libsyntax/parse/attr.rs | 1 + src/libsyntax/parse/lexer.rs | 8 ++++++-- src/libsyntax/parse/mod.rs | 2 ++ src/libsyntax/parse/prec.rs | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse') 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; -- cgit 1.4.1-3-g733a5