From 99df38347b28c64ca2724061fa6ef6733a823626 Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Sat, 30 May 2015 19:49:56 -0400 Subject: [PATCH] [libcollections] Fix unused import warnings during stage0 build --- src/libcollections/lib.rs | 5 ++--- src/libcollections/slice.rs | 4 ++++ src/libcollections/str.rs | 4 ++++ src/libcollections/vec_deque.rs | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index f7e784d3892e7..6c233a31149e7 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -37,12 +37,11 @@ #![feature(unsafe_no_drop_flag, filling_drop)] #![feature(step_by)] #![feature(str_char)] -#![feature(str_words)] #![feature(slice_patterns)] #![feature(utf8_error)] -#![cfg_attr(test, feature(rand, rustc_private, test, hash, collections, - collections_drain, collections_range))] +#![cfg_attr(test, feature(rand, test))] #![cfg_attr(test, allow(deprecated))] // rand +#![cfg_attr(not(test), feature(str_words))] #![feature(no_std)] #![no_std] diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 7ff28019de844..634b3f56e8e4c 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -79,6 +79,10 @@ #![doc(primitive = "slice")] #![stable(feature = "rust1", since = "1.0.0")] +// Many of the usings in this module are only used in the test configuration. +// It's cleaner to just turn off the unused_imports warning than to fix them. +#![allow(unused_imports)] + use alloc::boxed::Box; use core::clone::Clone; use core::cmp::Ordering::{self, Greater, Less}; diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index ccfc6dc0f29e8..aa9be37c9cc05 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -47,6 +47,10 @@ #![doc(primitive = "str")] #![stable(feature = "rust1", since = "1.0.0")] +// Many of the usings in this module are only used in the test configuration. +// It's cleaner to just turn off the unused_imports warning than to fix them. +#![allow(unused_imports)] + use self::RecompositionState::*; use self::DecompositionType::*; diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index 80bbe4681e728..0bc42bd2c7e02 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -1801,7 +1801,7 @@ impl fmt::Debug for VecDeque { #[cfg(test)] mod tests { - use core::iter::{Iterator, self}; + use core::iter::Iterator; use core::option::Option::Some; use test;