Skip to content

Commit 2c8d75d

Browse files
committed
Auto merge of #25935 - wesleywiser:fix_libcollection_build_warnings, r=alexcrichton
Fixes a bunch of warnings that are generated during the stage0 build of libcollections.
2 parents e8af475 + 99df383 commit 2c8d75d

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

src/libcollections/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@
3737
#![feature(unsafe_no_drop_flag, filling_drop)]
3838
#![feature(step_by)]
3939
#![feature(str_char)]
40-
#![feature(str_words)]
4140
#![feature(slice_patterns)]
4241
#![feature(utf8_error)]
43-
#![cfg_attr(test, feature(rand, rustc_private, test, hash, collections,
44-
collections_drain, collections_range))]
42+
#![cfg_attr(test, feature(rand, test))]
4543
#![cfg_attr(test, allow(deprecated))] // rand
44+
#![cfg_attr(not(test), feature(str_words))]
4645

4746
#![feature(no_std)]
4847
#![no_std]

src/libcollections/slice.rs

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
#![doc(primitive = "slice")]
8080
#![stable(feature = "rust1", since = "1.0.0")]
8181

82+
// Many of the usings in this module are only used in the test configuration.
83+
// It's cleaner to just turn off the unused_imports warning than to fix them.
84+
#![allow(unused_imports)]
85+
8286
use alloc::boxed::Box;
8387
use core::clone::Clone;
8488
use core::cmp::Ordering::{self, Greater, Less};

src/libcollections/str.rs

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
#![doc(primitive = "str")]
4848
#![stable(feature = "rust1", since = "1.0.0")]
4949

50+
// Many of the usings in this module are only used in the test configuration.
51+
// It's cleaner to just turn off the unused_imports warning than to fix them.
52+
#![allow(unused_imports)]
53+
5054
use self::RecompositionState::*;
5155
use self::DecompositionType::*;
5256

src/libcollections/vec_deque.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ impl<T: fmt::Debug> fmt::Debug for VecDeque<T> {
18011801

18021802
#[cfg(test)]
18031803
mod tests {
1804-
use core::iter::{Iterator, self};
1804+
use core::iter::Iterator;
18051805
use core::option::Option::Some;
18061806

18071807
use test;

0 commit comments

Comments
 (0)