Skip to content

Commit 02f6a03

Browse files
committed
Some final touches to ensure ./x.py test --stage 0 src/lib* works
1 parent f24915b commit 02f6a03

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

src/libcore/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
5151
// Since libcore defines many fundamental lang items, all tests live in a
5252
// separate crate, libcoretest, to avoid bizarre issues.
53+
#![cfg(not(test))]
5354

5455
#![stable(feature = "core", since = "1.6.0")]
5556
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

src/libcore/tests/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#![feature(reverse_bits)]
4747
#![feature(inclusive_range_methods)]
4848
#![feature(iterator_find_map)]
49+
#![feature(slice_internals)]
4950

5051
extern crate core;
5152
extern crate test;

src/libcore/tests/num/uint_macros.rs

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ mod tests {
9898
}
9999

100100
#[test]
101+
#[cfg(not(stage0))]
101102
fn test_reverse_bits() {
102103
assert_eq!(A.reverse_bits().reverse_bits(), A);
103104
assert_eq!(B.reverse_bits().reverse_bits(), B);

src/libstd/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@
330330
// with a rustc without jemalloc.
331331
// FIXME(#44236) shouldn't need MSVC logic
332332
#![cfg_attr(all(not(target_env = "msvc"),
333-
any(stage0, feature = "force_alloc_system")),
333+
any(all(stage0, not(test)), feature = "force_alloc_system")),
334334
feature(global_allocator))]
335335
#[cfg(all(not(target_env = "msvc"),
336-
any(stage0, feature = "force_alloc_system")))]
336+
any(all(stage0, not(test)), feature = "force_alloc_system")))]
337337
#[global_allocator]
338338
static ALLOC: alloc_system::System = alloc_system::System;
339339

0 commit comments

Comments
 (0)