Skip to content

Commit

Permalink
librustc: Add some missing use core::prelude::*; in the test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
pcwalton committed May 23, 2013
1 parent a5ca58a commit 18fca3e
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc/back/rpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ pub fn minimize_rpaths(rpaths: &[Path]) -> ~[Path] {

#[cfg(unix)]
mod test {
use core::prelude::*;

// FIXME(#2119): the outer attribute should be #[cfg(unix, test)], then
// these redundant #[cfg(test)] blocks can be removed
#[cfg(test)]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc/driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,8 @@ pub fn list_metadata(sess: Session, path: &Path, out: @io::Writer) {

#[cfg(test)]
mod test {
use core::prelude::*;

use driver::driver::{build_configuration, build_session};
use driver::driver::{build_session_options, optgroups, str_input};

Expand Down
3 changes: 3 additions & 0 deletions src/librustc/util/enum_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {

#[cfg(test)]
mod test {
use core::prelude::*;

use core::iter;

use util::enum_set::*;

#[deriving(Eq)]
Expand Down
1 change: 1 addition & 0 deletions src/librustdoc/attr_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ pub fn parse_hidden(attrs: ~[ast::attribute]) -> bool {

#[cfg(test)]
mod test {
use core::prelude::*;
use syntax::ast;
use syntax;
use super::{parse_hidden, parse_crate, parse_desc};
Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/attr_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ fn fold_impl(

#[cfg(test)]
mod test {
use core::prelude::*;

use astsrv;
use attr_pass::run;
use doc;
Expand Down
1 change: 1 addition & 0 deletions src/librustdoc/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ pub fn maybe_find_pandoc(

#[cfg(test)]
mod test {
use core::prelude::*;
use config::*;
use core::run::ProgramOutput;

Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/desc_to_brief_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ pub fn paragraphs(s: &str) -> ~[~str] {

#[cfg(test)]
mod test {
use core::prelude::*;

use astsrv;
use attr_pass;
use super::{extract, paragraphs, run};
Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/markdown_index_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ pub fn pandoc_header_id(header: &str) -> ~str {

#[cfg(test)]
mod test {
use core::prelude::*;

use astsrv;
use attr_pass;
use config;
Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/markdown_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ fn put_struct(

#[cfg(test)]
mod test {
use core::prelude::*;

use astsrv;
use attr_pass;
use config;
Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/markdown_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ fn future_writer() -> (Writer, future::Future<~str>) {

#[cfg(test)]
mod test {
use core::prelude::*;

use astsrv;
use doc;
use extract;
Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/sectionalize_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ fn parse_header(line: ~str) -> Option<~str> {

#[cfg(test)]
mod test {
use core::prelude::*;

use astsrv;
use attr_pass;
use doc;
Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/text_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ fn fold_impl(

#[cfg(test)]
mod test {
use core::prelude::*;

use astsrv;
use attr_pass;
use desc_to_brief_pass;
Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/tystr_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ fn strip_struct_extra_stuff(item: @ast::item) -> @ast::item {

#[cfg(test)]
mod test {
use core::prelude::*;

use astsrv;
use doc;
use extract;
Expand Down

0 comments on commit 18fca3e

Please sign in to comment.