Skip to content

Commit 6464198

Browse files
committed
std: Remove some old #[cfg(test) hacks
Since most lang items are actually defined in core, these hack reexports don't actually do anything useful.
1 parent fddfd08 commit 6464198

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/libstd/lib.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,36 +179,31 @@ extern crate libc;
179179

180180
#[macro_use] #[no_link] extern crate rustc_bitflags;
181181

182-
// Make std testable by not duplicating lang items. See #2912
182+
// Make std testable by not duplicating lang items and other globals. See #2912
183183
#[cfg(test)] extern crate std as realstd;
184-
#[cfg(test)] pub use realstd::marker;
185-
#[cfg(test)] pub use realstd::ops;
186-
#[cfg(test)] pub use realstd::cmp;
187-
#[cfg(test)] pub use realstd::boxed;
188-
189184

190185
// NB: These reexports are in the order they should be listed in rustdoc
191186

192187
pub use core::any;
193188
pub use core::cell;
194189
pub use core::clone;
195-
#[cfg(not(test))] pub use core::cmp;
190+
pub use core::cmp;
196191
pub use core::convert;
197192
pub use core::default;
198193
pub use core::hash;
199194
pub use core::intrinsics;
200195
pub use core::iter;
201-
#[cfg(not(test))] pub use core::marker;
196+
pub use core::marker;
202197
pub use core::mem;
203-
#[cfg(not(test))] pub use core::ops;
198+
pub use core::ops;
204199
pub use core::ptr;
205200
pub use core::raw;
206201
pub use core::simd;
207202
pub use core::result;
208203
pub use core::option;
209204
pub mod error;
210205

211-
#[cfg(not(test))] pub use alloc::boxed;
206+
pub use alloc::boxed;
212207
pub use alloc::rc;
213208

214209
pub use core_collections::borrow;

0 commit comments

Comments
 (0)