diff --git a/compiler/rustc_codegen_cranelift/build_system/tests.rs b/compiler/rustc_codegen_cranelift/build_system/tests.rs index 8de419a0c4eb2..bcb2b4881ebe4 100644 --- a/compiler/rustc_codegen_cranelift/build_system/tests.rs +++ b/compiler/rustc_codegen_cranelift/build_system/tests.rs @@ -151,7 +151,7 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[ apply_patches( &runner.dirs, "coretests", - &runner.stdlib_source.join("library/core/tests"), + &runner.stdlib_source.join("library/coretests"), &LIBCORE_TESTS_SRC.to_path(&runner.dirs), ); diff --git a/compiler/rustc_codegen_cranelift/patches/0022-coretests-Disable-not-compiling-tests.patch b/compiler/rustc_codegen_cranelift/patches/0022-coretests-Disable-not-compiling-tests.patch deleted file mode 100644 index 161173d47650f..0000000000000 --- a/compiler/rustc_codegen_cranelift/patches/0022-coretests-Disable-not-compiling-tests.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f6befc4bb51d84f5f1cf35938a168c953d421350 Mon Sep 17 00:00:00 2001 -From: bjorn3 -Date: Sun, 24 Nov 2019 15:10:23 +0100 -Subject: [PATCH] [core] Disable not compiling tests - ---- - library/core/tests/Cargo.toml | 8 ++++++++ - library/core/tests/num/flt2dec/mod.rs | 1 - - library/core/tests/num/int_macros.rs | 2 ++ - library/core/tests/num/uint_macros.rs | 2 ++ - library/core/tests/ptr.rs | 2 ++ - library/core/tests/slice.rs | 2 ++ - 6 files changed, 16 insertions(+), 1 deletion(-) - create mode 100644 library/core/tests/Cargo.toml - -diff --git a/Cargo.toml b/Cargo.toml -new file mode 100644 -index 0000000..46fd999 ---- /dev/null -+++ b/Cargo.toml -@@ -0,0 +1,12 @@ -+[package] -+name = "coretests" -+version = "0.0.0" -+edition = "2021" -+ -+[lib] -+name = "coretests" -+path = "lib.rs" -+ -+[dependencies] -+rand = { version = "0.8.5", default-features = false } -+rand_xorshift = { version = "0.3.0", default-features = false } -diff --git a/lib.rs b/lib.rs -index 42a26ae..5ac1042 100644 ---- a/lib.rs -+++ b/lib.rs -@@ -1,3 +1,4 @@ -+#![cfg(test)] - // tidy-alphabetical-start - #![cfg_attr(target_has_atomic = "128", feature(integer_atomics))] - #![cfg_attr(test, feature(cfg_match))] --- -2.21.0 (Apple Git-122) diff --git a/compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch b/compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch index 06840624ceffe..4a06dc3f7ef85 100644 --- a/compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch +++ b/compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch @@ -10,21 +10,20 @@ Cranelift doesn't support them yet library/core/tests/atomic.rs | 4 --- 4 files changed, 4 insertions(+), 50 deletions(-) -diff --git a/lib.rs b/lib.rs +diff --git a/tests/lib.rs b/tests/lib.rs index 1e336bf..35e6f54 100644 ---- a/lib.rs -+++ b/lib.rs -@@ -2,6 +2,5 @@ - #![cfg(test)] +--- a/tests/lib.rs ++++ b/tests/lib.rs +@@ -2,5 +2,4 @@ // tidy-alphabetical-start -#![cfg_attr(target_has_atomic = "128", feature(integer_atomics))] #![cfg_attr(test, feature(cfg_match))] #![feature(alloc_layout_extra)] #![feature(array_chunks)] -diff --git a/atomic.rs b/atomic.rs +diff --git a/tests/atomic.rs b/tests/atomic.rs index b735957..ea728b6 100644 ---- a/atomic.rs -+++ b/atomic.rs +--- a/tests/atomic.rs ++++ b/tests/atomic.rs @@ -185,10 +185,6 @@ fn atomic_alignment() { assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "64")] diff --git a/compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch b/compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch index b98326c54a67a..5a38dffa24fe0 100644 --- a/compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch +++ b/compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Disable long running tests library/core/tests/slice.rs | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/slice.rs b/slice.rs +diff --git a/tests/slice.rs b/tests/slice.rs index 8402833..84592e0 100644 ---- a/slice.rs -+++ b/slice.rs +--- a/tests/slice.rs ++++ b/tests/slice.rs @@ -1809,6 +1809,7 @@ fn sort_unstable() { } } diff --git a/library/Cargo.lock b/library/Cargo.lock index 7b9081d46a056..30875482dc06e 100644 --- a/library/Cargo.lock +++ b/library/Cargo.lock @@ -72,6 +72,10 @@ dependencies = [ [[package]] name = "core" version = "0.0.0" + +[[package]] +name = "coretests" +version = "0.0.0" dependencies = [ "rand", "rand_xorshift", diff --git a/library/Cargo.toml b/library/Cargo.toml index e59aa518804f3..1205f7c9ed6b5 100644 --- a/library/Cargo.toml +++ b/library/Cargo.toml @@ -3,6 +3,7 @@ resolver = "1" members = [ "std", "sysroot", + "coretests", ] exclude = [ diff --git a/library/core/Cargo.toml b/library/core/Cargo.toml index 46c55c437cce5..b7c6db6c78dde 100644 --- a/library/core/Cargo.toml +++ b/library/core/Cargo.toml @@ -15,19 +15,6 @@ edition = "2021" test = false bench = false -[[test]] -name = "coretests" -path = "tests/lib.rs" - -[[bench]] -name = "corebenches" -path = "benches/lib.rs" -test = true - -[dev-dependencies] -rand = { version = "0.8.5", default-features = false } -rand_xorshift = { version = "0.3.0", default-features = false } - [features] # Make panics and failed asserts immediately abort without formatting any message panic_immediate_abort = [] diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 01ed3cc69a2cc..c18e0405f7293 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -44,7 +44,7 @@ //! called. The `lang` attribute is called `eh_personality`. // Since core defines many fundamental lang items, all tests live in a -// separate crate, libcoretest (library/core/tests), to avoid bizarre issues. +// separate crate, coretests (library/coretests), to avoid bizarre issues. // // Here we explicitly #[cfg]-out this whole crate when testing. If we don't do // this, both the generated test artifact and the linked libtest (which diff --git a/library/coretests/Cargo.toml b/library/coretests/Cargo.toml new file mode 100644 index 0000000000000..ec940abea1171 --- /dev/null +++ b/library/coretests/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "coretests" +version = "0.0.0" +license = "MIT OR Apache-2.0" +repository = "https://github.com/rust-lang/rust.git" +description = "Tests for the Rust Core Library" +autotests = false +autobenches = false +edition = "2021" + +[lib] +path = "lib.rs" +test = false +bench = false + +[[test]] +name = "coretests" +path = "tests/lib.rs" + +[[bench]] +name = "corebenches" +path = "benches/lib.rs" +test = true + +[dev-dependencies] +rand = { version = "0.8.5", default-features = false } +rand_xorshift = { version = "0.3.0", default-features = false } diff --git a/library/core/benches/any.rs b/library/coretests/benches/any.rs similarity index 100% rename from library/core/benches/any.rs rename to library/coretests/benches/any.rs diff --git a/library/core/benches/array.rs b/library/coretests/benches/array.rs similarity index 100% rename from library/core/benches/array.rs rename to library/coretests/benches/array.rs diff --git a/library/core/benches/ascii.rs b/library/coretests/benches/ascii.rs similarity index 100% rename from library/core/benches/ascii.rs rename to library/coretests/benches/ascii.rs diff --git a/library/core/benches/ascii/is_ascii.rs b/library/coretests/benches/ascii/is_ascii.rs similarity index 100% rename from library/core/benches/ascii/is_ascii.rs rename to library/coretests/benches/ascii/is_ascii.rs diff --git a/library/core/benches/char/methods.rs b/library/coretests/benches/char/methods.rs similarity index 100% rename from library/core/benches/char/methods.rs rename to library/coretests/benches/char/methods.rs diff --git a/library/core/benches/char/mod.rs b/library/coretests/benches/char/mod.rs similarity index 100% rename from library/core/benches/char/mod.rs rename to library/coretests/benches/char/mod.rs diff --git a/library/core/benches/fmt.rs b/library/coretests/benches/fmt.rs similarity index 100% rename from library/core/benches/fmt.rs rename to library/coretests/benches/fmt.rs diff --git a/library/core/benches/hash/mod.rs b/library/coretests/benches/hash/mod.rs similarity index 100% rename from library/core/benches/hash/mod.rs rename to library/coretests/benches/hash/mod.rs diff --git a/library/core/benches/hash/sip.rs b/library/coretests/benches/hash/sip.rs similarity index 100% rename from library/core/benches/hash/sip.rs rename to library/coretests/benches/hash/sip.rs diff --git a/library/core/benches/iter.rs b/library/coretests/benches/iter.rs similarity index 100% rename from library/core/benches/iter.rs rename to library/coretests/benches/iter.rs diff --git a/library/core/benches/lib.rs b/library/coretests/benches/lib.rs similarity index 100% rename from library/core/benches/lib.rs rename to library/coretests/benches/lib.rs diff --git a/library/core/benches/net/addr_parser.rs b/library/coretests/benches/net/addr_parser.rs similarity index 100% rename from library/core/benches/net/addr_parser.rs rename to library/coretests/benches/net/addr_parser.rs diff --git a/library/core/benches/net/mod.rs b/library/coretests/benches/net/mod.rs similarity index 100% rename from library/core/benches/net/mod.rs rename to library/coretests/benches/net/mod.rs diff --git a/library/core/benches/num/dec2flt/mod.rs b/library/coretests/benches/num/dec2flt/mod.rs similarity index 100% rename from library/core/benches/num/dec2flt/mod.rs rename to library/coretests/benches/num/dec2flt/mod.rs diff --git a/library/core/benches/num/flt2dec/mod.rs b/library/coretests/benches/num/flt2dec/mod.rs similarity index 100% rename from library/core/benches/num/flt2dec/mod.rs rename to library/coretests/benches/num/flt2dec/mod.rs diff --git a/library/core/benches/num/flt2dec/strategy/dragon.rs b/library/coretests/benches/num/flt2dec/strategy/dragon.rs similarity index 100% rename from library/core/benches/num/flt2dec/strategy/dragon.rs rename to library/coretests/benches/num/flt2dec/strategy/dragon.rs diff --git a/library/core/benches/num/flt2dec/strategy/grisu.rs b/library/coretests/benches/num/flt2dec/strategy/grisu.rs similarity index 100% rename from library/core/benches/num/flt2dec/strategy/grisu.rs rename to library/coretests/benches/num/flt2dec/strategy/grisu.rs diff --git a/library/core/benches/num/int_log/mod.rs b/library/coretests/benches/num/int_log/mod.rs similarity index 100% rename from library/core/benches/num/int_log/mod.rs rename to library/coretests/benches/num/int_log/mod.rs diff --git a/library/core/benches/num/int_pow/mod.rs b/library/coretests/benches/num/int_pow/mod.rs similarity index 100% rename from library/core/benches/num/int_pow/mod.rs rename to library/coretests/benches/num/int_pow/mod.rs diff --git a/library/core/benches/num/int_sqrt/mod.rs b/library/coretests/benches/num/int_sqrt/mod.rs similarity index 100% rename from library/core/benches/num/int_sqrt/mod.rs rename to library/coretests/benches/num/int_sqrt/mod.rs diff --git a/library/core/benches/num/mod.rs b/library/coretests/benches/num/mod.rs similarity index 100% rename from library/core/benches/num/mod.rs rename to library/coretests/benches/num/mod.rs diff --git a/library/core/benches/ops.rs b/library/coretests/benches/ops.rs similarity index 100% rename from library/core/benches/ops.rs rename to library/coretests/benches/ops.rs diff --git a/library/core/benches/pattern.rs b/library/coretests/benches/pattern.rs similarity index 100% rename from library/core/benches/pattern.rs rename to library/coretests/benches/pattern.rs diff --git a/library/core/benches/slice.rs b/library/coretests/benches/slice.rs similarity index 100% rename from library/core/benches/slice.rs rename to library/coretests/benches/slice.rs diff --git a/library/core/benches/str.rs b/library/coretests/benches/str.rs similarity index 100% rename from library/core/benches/str.rs rename to library/coretests/benches/str.rs diff --git a/library/core/benches/str/char_count.rs b/library/coretests/benches/str/char_count.rs similarity index 100% rename from library/core/benches/str/char_count.rs rename to library/coretests/benches/str/char_count.rs diff --git a/library/core/benches/str/corpora.rs b/library/coretests/benches/str/corpora.rs similarity index 100% rename from library/core/benches/str/corpora.rs rename to library/coretests/benches/str/corpora.rs diff --git a/library/core/benches/str/debug.rs b/library/coretests/benches/str/debug.rs similarity index 100% rename from library/core/benches/str/debug.rs rename to library/coretests/benches/str/debug.rs diff --git a/library/core/benches/str/iter.rs b/library/coretests/benches/str/iter.rs similarity index 100% rename from library/core/benches/str/iter.rs rename to library/coretests/benches/str/iter.rs diff --git a/library/core/benches/tuple.rs b/library/coretests/benches/tuple.rs similarity index 100% rename from library/core/benches/tuple.rs rename to library/coretests/benches/tuple.rs diff --git a/library/coretests/lib.rs b/library/coretests/lib.rs new file mode 100644 index 0000000000000..b49208cd4eb3a --- /dev/null +++ b/library/coretests/lib.rs @@ -0,0 +1 @@ +// Intentionally left empty. diff --git a/library/core/tests/alloc.rs b/library/coretests/tests/alloc.rs similarity index 100% rename from library/core/tests/alloc.rs rename to library/coretests/tests/alloc.rs diff --git a/library/core/tests/any.rs b/library/coretests/tests/any.rs similarity index 100% rename from library/core/tests/any.rs rename to library/coretests/tests/any.rs diff --git a/library/core/tests/array.rs b/library/coretests/tests/array.rs similarity index 100% rename from library/core/tests/array.rs rename to library/coretests/tests/array.rs diff --git a/library/core/tests/ascii.rs b/library/coretests/tests/ascii.rs similarity index 100% rename from library/core/tests/ascii.rs rename to library/coretests/tests/ascii.rs diff --git a/library/core/tests/ascii_char.rs b/library/coretests/tests/ascii_char.rs similarity index 100% rename from library/core/tests/ascii_char.rs rename to library/coretests/tests/ascii_char.rs diff --git a/library/core/tests/asserting.rs b/library/coretests/tests/asserting.rs similarity index 100% rename from library/core/tests/asserting.rs rename to library/coretests/tests/asserting.rs diff --git a/library/core/tests/async_iter/mod.rs b/library/coretests/tests/async_iter/mod.rs similarity index 100% rename from library/core/tests/async_iter/mod.rs rename to library/coretests/tests/async_iter/mod.rs diff --git a/library/core/tests/atomic.rs b/library/coretests/tests/atomic.rs similarity index 100% rename from library/core/tests/atomic.rs rename to library/coretests/tests/atomic.rs diff --git a/library/core/tests/bool.rs b/library/coretests/tests/bool.rs similarity index 100% rename from library/core/tests/bool.rs rename to library/coretests/tests/bool.rs diff --git a/library/core/tests/bstr.rs b/library/coretests/tests/bstr.rs similarity index 98% rename from library/core/tests/bstr.rs rename to library/coretests/tests/bstr.rs index 5fecd0a4084c7..cd4d69d6b337d 100644 --- a/library/core/tests/bstr.rs +++ b/library/coretests/tests/bstr.rs @@ -1,6 +1,4 @@ -#![feature(bstr)] - -use core::ByteStr; +use core::bstr::ByteStr; #[test] fn test_debug() { diff --git a/library/core/tests/cell.rs b/library/coretests/tests/cell.rs similarity index 100% rename from library/core/tests/cell.rs rename to library/coretests/tests/cell.rs diff --git a/library/core/tests/char.rs b/library/coretests/tests/char.rs similarity index 100% rename from library/core/tests/char.rs rename to library/coretests/tests/char.rs diff --git a/library/core/tests/clone.rs b/library/coretests/tests/clone.rs similarity index 100% rename from library/core/tests/clone.rs rename to library/coretests/tests/clone.rs diff --git a/library/core/tests/cmp.rs b/library/coretests/tests/cmp.rs similarity index 100% rename from library/core/tests/cmp.rs rename to library/coretests/tests/cmp.rs diff --git a/library/core/tests/const_ptr.rs b/library/coretests/tests/const_ptr.rs similarity index 100% rename from library/core/tests/const_ptr.rs rename to library/coretests/tests/const_ptr.rs diff --git a/library/core/tests/convert.rs b/library/coretests/tests/convert.rs similarity index 100% rename from library/core/tests/convert.rs rename to library/coretests/tests/convert.rs diff --git a/library/core/tests/error.rs b/library/coretests/tests/error.rs similarity index 100% rename from library/core/tests/error.rs rename to library/coretests/tests/error.rs diff --git a/library/core/tests/ffi.rs b/library/coretests/tests/ffi.rs similarity index 100% rename from library/core/tests/ffi.rs rename to library/coretests/tests/ffi.rs diff --git a/library/core/tests/ffi/cstr.rs b/library/coretests/tests/ffi/cstr.rs similarity index 100% rename from library/core/tests/ffi/cstr.rs rename to library/coretests/tests/ffi/cstr.rs diff --git a/library/core/tests/fmt/builders.rs b/library/coretests/tests/fmt/builders.rs similarity index 100% rename from library/core/tests/fmt/builders.rs rename to library/coretests/tests/fmt/builders.rs diff --git a/library/core/tests/fmt/float.rs b/library/coretests/tests/fmt/float.rs similarity index 100% rename from library/core/tests/fmt/float.rs rename to library/coretests/tests/fmt/float.rs diff --git a/library/core/tests/fmt/mod.rs b/library/coretests/tests/fmt/mod.rs similarity index 100% rename from library/core/tests/fmt/mod.rs rename to library/coretests/tests/fmt/mod.rs diff --git a/library/core/tests/fmt/num.rs b/library/coretests/tests/fmt/num.rs similarity index 100% rename from library/core/tests/fmt/num.rs rename to library/coretests/tests/fmt/num.rs diff --git a/library/core/tests/future.rs b/library/coretests/tests/future.rs similarity index 100% rename from library/core/tests/future.rs rename to library/coretests/tests/future.rs diff --git a/library/core/tests/hash/mod.rs b/library/coretests/tests/hash/mod.rs similarity index 100% rename from library/core/tests/hash/mod.rs rename to library/coretests/tests/hash/mod.rs diff --git a/library/core/tests/hash/sip.rs b/library/coretests/tests/hash/sip.rs similarity index 100% rename from library/core/tests/hash/sip.rs rename to library/coretests/tests/hash/sip.rs diff --git a/library/core/tests/intrinsics.rs b/library/coretests/tests/intrinsics.rs similarity index 100% rename from library/core/tests/intrinsics.rs rename to library/coretests/tests/intrinsics.rs diff --git a/library/core/tests/io/borrowed_buf.rs b/library/coretests/tests/io/borrowed_buf.rs similarity index 100% rename from library/core/tests/io/borrowed_buf.rs rename to library/coretests/tests/io/borrowed_buf.rs diff --git a/library/core/tests/io/mod.rs b/library/coretests/tests/io/mod.rs similarity index 100% rename from library/core/tests/io/mod.rs rename to library/coretests/tests/io/mod.rs diff --git a/library/core/tests/iter/adapters/array_chunks.rs b/library/coretests/tests/iter/adapters/array_chunks.rs similarity index 100% rename from library/core/tests/iter/adapters/array_chunks.rs rename to library/coretests/tests/iter/adapters/array_chunks.rs diff --git a/library/core/tests/iter/adapters/by_ref_sized.rs b/library/coretests/tests/iter/adapters/by_ref_sized.rs similarity index 100% rename from library/core/tests/iter/adapters/by_ref_sized.rs rename to library/coretests/tests/iter/adapters/by_ref_sized.rs diff --git a/library/core/tests/iter/adapters/chain.rs b/library/coretests/tests/iter/adapters/chain.rs similarity index 100% rename from library/core/tests/iter/adapters/chain.rs rename to library/coretests/tests/iter/adapters/chain.rs diff --git a/library/core/tests/iter/adapters/cloned.rs b/library/coretests/tests/iter/adapters/cloned.rs similarity index 100% rename from library/core/tests/iter/adapters/cloned.rs rename to library/coretests/tests/iter/adapters/cloned.rs diff --git a/library/core/tests/iter/adapters/copied.rs b/library/coretests/tests/iter/adapters/copied.rs similarity index 100% rename from library/core/tests/iter/adapters/copied.rs rename to library/coretests/tests/iter/adapters/copied.rs diff --git a/library/core/tests/iter/adapters/cycle.rs b/library/coretests/tests/iter/adapters/cycle.rs similarity index 100% rename from library/core/tests/iter/adapters/cycle.rs rename to library/coretests/tests/iter/adapters/cycle.rs diff --git a/library/core/tests/iter/adapters/enumerate.rs b/library/coretests/tests/iter/adapters/enumerate.rs similarity index 100% rename from library/core/tests/iter/adapters/enumerate.rs rename to library/coretests/tests/iter/adapters/enumerate.rs diff --git a/library/core/tests/iter/adapters/filter.rs b/library/coretests/tests/iter/adapters/filter.rs similarity index 100% rename from library/core/tests/iter/adapters/filter.rs rename to library/coretests/tests/iter/adapters/filter.rs diff --git a/library/core/tests/iter/adapters/filter_map.rs b/library/coretests/tests/iter/adapters/filter_map.rs similarity index 100% rename from library/core/tests/iter/adapters/filter_map.rs rename to library/coretests/tests/iter/adapters/filter_map.rs diff --git a/library/core/tests/iter/adapters/flat_map.rs b/library/coretests/tests/iter/adapters/flat_map.rs similarity index 100% rename from library/core/tests/iter/adapters/flat_map.rs rename to library/coretests/tests/iter/adapters/flat_map.rs diff --git a/library/core/tests/iter/adapters/flatten.rs b/library/coretests/tests/iter/adapters/flatten.rs similarity index 100% rename from library/core/tests/iter/adapters/flatten.rs rename to library/coretests/tests/iter/adapters/flatten.rs diff --git a/library/core/tests/iter/adapters/fuse.rs b/library/coretests/tests/iter/adapters/fuse.rs similarity index 100% rename from library/core/tests/iter/adapters/fuse.rs rename to library/coretests/tests/iter/adapters/fuse.rs diff --git a/library/core/tests/iter/adapters/inspect.rs b/library/coretests/tests/iter/adapters/inspect.rs similarity index 100% rename from library/core/tests/iter/adapters/inspect.rs rename to library/coretests/tests/iter/adapters/inspect.rs diff --git a/library/core/tests/iter/adapters/intersperse.rs b/library/coretests/tests/iter/adapters/intersperse.rs similarity index 100% rename from library/core/tests/iter/adapters/intersperse.rs rename to library/coretests/tests/iter/adapters/intersperse.rs diff --git a/library/core/tests/iter/adapters/map.rs b/library/coretests/tests/iter/adapters/map.rs similarity index 100% rename from library/core/tests/iter/adapters/map.rs rename to library/coretests/tests/iter/adapters/map.rs diff --git a/library/core/tests/iter/adapters/map_windows.rs b/library/coretests/tests/iter/adapters/map_windows.rs similarity index 100% rename from library/core/tests/iter/adapters/map_windows.rs rename to library/coretests/tests/iter/adapters/map_windows.rs diff --git a/library/core/tests/iter/adapters/mod.rs b/library/coretests/tests/iter/adapters/mod.rs similarity index 100% rename from library/core/tests/iter/adapters/mod.rs rename to library/coretests/tests/iter/adapters/mod.rs diff --git a/library/core/tests/iter/adapters/peekable.rs b/library/coretests/tests/iter/adapters/peekable.rs similarity index 100% rename from library/core/tests/iter/adapters/peekable.rs rename to library/coretests/tests/iter/adapters/peekable.rs diff --git a/library/core/tests/iter/adapters/scan.rs b/library/coretests/tests/iter/adapters/scan.rs similarity index 100% rename from library/core/tests/iter/adapters/scan.rs rename to library/coretests/tests/iter/adapters/scan.rs diff --git a/library/core/tests/iter/adapters/skip.rs b/library/coretests/tests/iter/adapters/skip.rs similarity index 100% rename from library/core/tests/iter/adapters/skip.rs rename to library/coretests/tests/iter/adapters/skip.rs diff --git a/library/core/tests/iter/adapters/skip_while.rs b/library/coretests/tests/iter/adapters/skip_while.rs similarity index 100% rename from library/core/tests/iter/adapters/skip_while.rs rename to library/coretests/tests/iter/adapters/skip_while.rs diff --git a/library/core/tests/iter/adapters/step_by.rs b/library/coretests/tests/iter/adapters/step_by.rs similarity index 100% rename from library/core/tests/iter/adapters/step_by.rs rename to library/coretests/tests/iter/adapters/step_by.rs diff --git a/library/core/tests/iter/adapters/take.rs b/library/coretests/tests/iter/adapters/take.rs similarity index 100% rename from library/core/tests/iter/adapters/take.rs rename to library/coretests/tests/iter/adapters/take.rs diff --git a/library/core/tests/iter/adapters/take_while.rs b/library/coretests/tests/iter/adapters/take_while.rs similarity index 100% rename from library/core/tests/iter/adapters/take_while.rs rename to library/coretests/tests/iter/adapters/take_while.rs diff --git a/library/core/tests/iter/adapters/zip.rs b/library/coretests/tests/iter/adapters/zip.rs similarity index 100% rename from library/core/tests/iter/adapters/zip.rs rename to library/coretests/tests/iter/adapters/zip.rs diff --git a/library/core/tests/iter/mod.rs b/library/coretests/tests/iter/mod.rs similarity index 100% rename from library/core/tests/iter/mod.rs rename to library/coretests/tests/iter/mod.rs diff --git a/library/core/tests/iter/range.rs b/library/coretests/tests/iter/range.rs similarity index 100% rename from library/core/tests/iter/range.rs rename to library/coretests/tests/iter/range.rs diff --git a/library/core/tests/iter/sources.rs b/library/coretests/tests/iter/sources.rs similarity index 100% rename from library/core/tests/iter/sources.rs rename to library/coretests/tests/iter/sources.rs diff --git a/library/core/tests/iter/traits/accum.rs b/library/coretests/tests/iter/traits/accum.rs similarity index 100% rename from library/core/tests/iter/traits/accum.rs rename to library/coretests/tests/iter/traits/accum.rs diff --git a/library/core/tests/iter/traits/double_ended.rs b/library/coretests/tests/iter/traits/double_ended.rs similarity index 100% rename from library/core/tests/iter/traits/double_ended.rs rename to library/coretests/tests/iter/traits/double_ended.rs diff --git a/library/core/tests/iter/traits/iterator.rs b/library/coretests/tests/iter/traits/iterator.rs similarity index 100% rename from library/core/tests/iter/traits/iterator.rs rename to library/coretests/tests/iter/traits/iterator.rs diff --git a/library/core/tests/iter/traits/mod.rs b/library/coretests/tests/iter/traits/mod.rs similarity index 100% rename from library/core/tests/iter/traits/mod.rs rename to library/coretests/tests/iter/traits/mod.rs diff --git a/library/core/tests/iter/traits/step.rs b/library/coretests/tests/iter/traits/step.rs similarity index 100% rename from library/core/tests/iter/traits/step.rs rename to library/coretests/tests/iter/traits/step.rs diff --git a/library/core/tests/lazy.rs b/library/coretests/tests/lazy.rs similarity index 100% rename from library/core/tests/lazy.rs rename to library/coretests/tests/lazy.rs diff --git a/library/core/tests/lib.rs b/library/coretests/tests/lib.rs similarity index 99% rename from library/core/tests/lib.rs rename to library/coretests/tests/lib.rs index a8980c5f30aec..0607d508a48e5 100644 --- a/library/core/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -11,6 +11,7 @@ #![feature(async_iter_from_iter)] #![feature(async_iterator)] #![feature(bigint_helper_methods)] +#![feature(bstr)] #![feature(cell_update)] #![feature(clone_to_uninit)] #![feature(const_black_box)] @@ -139,6 +140,7 @@ mod asserting; mod async_iter; mod atomic; mod bool; +mod bstr; mod cell; mod char; mod clone; diff --git a/library/core/tests/macros.rs b/library/coretests/tests/macros.rs similarity index 100% rename from library/core/tests/macros.rs rename to library/coretests/tests/macros.rs diff --git a/library/core/tests/macros_bootstrap.rs b/library/coretests/tests/macros_bootstrap.rs similarity index 100% rename from library/core/tests/macros_bootstrap.rs rename to library/coretests/tests/macros_bootstrap.rs diff --git a/library/core/tests/manually_drop.rs b/library/coretests/tests/manually_drop.rs similarity index 100% rename from library/core/tests/manually_drop.rs rename to library/coretests/tests/manually_drop.rs diff --git a/library/core/tests/mem.rs b/library/coretests/tests/mem.rs similarity index 100% rename from library/core/tests/mem.rs rename to library/coretests/tests/mem.rs diff --git a/library/core/tests/net/ip_addr.rs b/library/coretests/tests/net/ip_addr.rs similarity index 100% rename from library/core/tests/net/ip_addr.rs rename to library/coretests/tests/net/ip_addr.rs diff --git a/library/core/tests/net/mod.rs b/library/coretests/tests/net/mod.rs similarity index 100% rename from library/core/tests/net/mod.rs rename to library/coretests/tests/net/mod.rs diff --git a/library/core/tests/net/parser.rs b/library/coretests/tests/net/parser.rs similarity index 100% rename from library/core/tests/net/parser.rs rename to library/coretests/tests/net/parser.rs diff --git a/library/core/tests/net/socket_addr.rs b/library/coretests/tests/net/socket_addr.rs similarity index 100% rename from library/core/tests/net/socket_addr.rs rename to library/coretests/tests/net/socket_addr.rs diff --git a/library/core/tests/nonzero.rs b/library/coretests/tests/nonzero.rs similarity index 100% rename from library/core/tests/nonzero.rs rename to library/coretests/tests/nonzero.rs diff --git a/library/core/tests/num/bignum.rs b/library/coretests/tests/num/bignum.rs similarity index 100% rename from library/core/tests/num/bignum.rs rename to library/coretests/tests/num/bignum.rs diff --git a/library/core/tests/num/const_from.rs b/library/coretests/tests/num/const_from.rs similarity index 100% rename from library/core/tests/num/const_from.rs rename to library/coretests/tests/num/const_from.rs diff --git a/library/core/tests/num/dec2flt/float.rs b/library/coretests/tests/num/dec2flt/float.rs similarity index 100% rename from library/core/tests/num/dec2flt/float.rs rename to library/coretests/tests/num/dec2flt/float.rs diff --git a/library/core/tests/num/dec2flt/lemire.rs b/library/coretests/tests/num/dec2flt/lemire.rs similarity index 100% rename from library/core/tests/num/dec2flt/lemire.rs rename to library/coretests/tests/num/dec2flt/lemire.rs diff --git a/library/core/tests/num/dec2flt/mod.rs b/library/coretests/tests/num/dec2flt/mod.rs similarity index 100% rename from library/core/tests/num/dec2flt/mod.rs rename to library/coretests/tests/num/dec2flt/mod.rs diff --git a/library/core/tests/num/dec2flt/parse.rs b/library/coretests/tests/num/dec2flt/parse.rs similarity index 100% rename from library/core/tests/num/dec2flt/parse.rs rename to library/coretests/tests/num/dec2flt/parse.rs diff --git a/library/core/tests/num/float_iter_sum_identity.rs b/library/coretests/tests/num/float_iter_sum_identity.rs similarity index 100% rename from library/core/tests/num/float_iter_sum_identity.rs rename to library/coretests/tests/num/float_iter_sum_identity.rs diff --git a/library/core/tests/num/flt2dec/estimator.rs b/library/coretests/tests/num/flt2dec/estimator.rs similarity index 100% rename from library/core/tests/num/flt2dec/estimator.rs rename to library/coretests/tests/num/flt2dec/estimator.rs diff --git a/library/core/tests/num/flt2dec/mod.rs b/library/coretests/tests/num/flt2dec/mod.rs similarity index 100% rename from library/core/tests/num/flt2dec/mod.rs rename to library/coretests/tests/num/flt2dec/mod.rs diff --git a/library/core/tests/num/flt2dec/random.rs b/library/coretests/tests/num/flt2dec/random.rs similarity index 100% rename from library/core/tests/num/flt2dec/random.rs rename to library/coretests/tests/num/flt2dec/random.rs diff --git a/library/core/tests/num/flt2dec/strategy/dragon.rs b/library/coretests/tests/num/flt2dec/strategy/dragon.rs similarity index 100% rename from library/core/tests/num/flt2dec/strategy/dragon.rs rename to library/coretests/tests/num/flt2dec/strategy/dragon.rs diff --git a/library/core/tests/num/flt2dec/strategy/grisu.rs b/library/coretests/tests/num/flt2dec/strategy/grisu.rs similarity index 100% rename from library/core/tests/num/flt2dec/strategy/grisu.rs rename to library/coretests/tests/num/flt2dec/strategy/grisu.rs diff --git a/library/core/tests/num/i128.rs b/library/coretests/tests/num/i128.rs similarity index 100% rename from library/core/tests/num/i128.rs rename to library/coretests/tests/num/i128.rs diff --git a/library/core/tests/num/i16.rs b/library/coretests/tests/num/i16.rs similarity index 100% rename from library/core/tests/num/i16.rs rename to library/coretests/tests/num/i16.rs diff --git a/library/core/tests/num/i32.rs b/library/coretests/tests/num/i32.rs similarity index 100% rename from library/core/tests/num/i32.rs rename to library/coretests/tests/num/i32.rs diff --git a/library/core/tests/num/i64.rs b/library/coretests/tests/num/i64.rs similarity index 100% rename from library/core/tests/num/i64.rs rename to library/coretests/tests/num/i64.rs diff --git a/library/core/tests/num/i8.rs b/library/coretests/tests/num/i8.rs similarity index 100% rename from library/core/tests/num/i8.rs rename to library/coretests/tests/num/i8.rs diff --git a/library/core/tests/num/ieee754.rs b/library/coretests/tests/num/ieee754.rs similarity index 100% rename from library/core/tests/num/ieee754.rs rename to library/coretests/tests/num/ieee754.rs diff --git a/library/core/tests/num/int_log.rs b/library/coretests/tests/num/int_log.rs similarity index 100% rename from library/core/tests/num/int_log.rs rename to library/coretests/tests/num/int_log.rs diff --git a/library/core/tests/num/int_macros.rs b/library/coretests/tests/num/int_macros.rs similarity index 100% rename from library/core/tests/num/int_macros.rs rename to library/coretests/tests/num/int_macros.rs diff --git a/library/core/tests/num/int_sqrt.rs b/library/coretests/tests/num/int_sqrt.rs similarity index 100% rename from library/core/tests/num/int_sqrt.rs rename to library/coretests/tests/num/int_sqrt.rs diff --git a/library/core/tests/num/midpoint.rs b/library/coretests/tests/num/midpoint.rs similarity index 100% rename from library/core/tests/num/midpoint.rs rename to library/coretests/tests/num/midpoint.rs diff --git a/library/core/tests/num/mod.rs b/library/coretests/tests/num/mod.rs similarity index 100% rename from library/core/tests/num/mod.rs rename to library/coretests/tests/num/mod.rs diff --git a/library/core/tests/num/nan.rs b/library/coretests/tests/num/nan.rs similarity index 100% rename from library/core/tests/num/nan.rs rename to library/coretests/tests/num/nan.rs diff --git a/library/core/tests/num/ops.rs b/library/coretests/tests/num/ops.rs similarity index 100% rename from library/core/tests/num/ops.rs rename to library/coretests/tests/num/ops.rs diff --git a/library/core/tests/num/u128.rs b/library/coretests/tests/num/u128.rs similarity index 100% rename from library/core/tests/num/u128.rs rename to library/coretests/tests/num/u128.rs diff --git a/library/core/tests/num/u16.rs b/library/coretests/tests/num/u16.rs similarity index 100% rename from library/core/tests/num/u16.rs rename to library/coretests/tests/num/u16.rs diff --git a/library/core/tests/num/u32.rs b/library/coretests/tests/num/u32.rs similarity index 100% rename from library/core/tests/num/u32.rs rename to library/coretests/tests/num/u32.rs diff --git a/library/core/tests/num/u64.rs b/library/coretests/tests/num/u64.rs similarity index 100% rename from library/core/tests/num/u64.rs rename to library/coretests/tests/num/u64.rs diff --git a/library/core/tests/num/u8.rs b/library/coretests/tests/num/u8.rs similarity index 100% rename from library/core/tests/num/u8.rs rename to library/coretests/tests/num/u8.rs diff --git a/library/core/tests/num/uint_macros.rs b/library/coretests/tests/num/uint_macros.rs similarity index 100% rename from library/core/tests/num/uint_macros.rs rename to library/coretests/tests/num/uint_macros.rs diff --git a/library/core/tests/num/wrapping.rs b/library/coretests/tests/num/wrapping.rs similarity index 100% rename from library/core/tests/num/wrapping.rs rename to library/coretests/tests/num/wrapping.rs diff --git a/library/core/tests/ops.rs b/library/coretests/tests/ops.rs similarity index 100% rename from library/core/tests/ops.rs rename to library/coretests/tests/ops.rs diff --git a/library/core/tests/ops/control_flow.rs b/library/coretests/tests/ops/control_flow.rs similarity index 100% rename from library/core/tests/ops/control_flow.rs rename to library/coretests/tests/ops/control_flow.rs diff --git a/library/core/tests/ops/from_residual.rs b/library/coretests/tests/ops/from_residual.rs similarity index 100% rename from library/core/tests/ops/from_residual.rs rename to library/coretests/tests/ops/from_residual.rs diff --git a/library/core/tests/option.rs b/library/coretests/tests/option.rs similarity index 100% rename from library/core/tests/option.rs rename to library/coretests/tests/option.rs diff --git a/library/core/tests/panic.rs b/library/coretests/tests/panic.rs similarity index 100% rename from library/core/tests/panic.rs rename to library/coretests/tests/panic.rs diff --git a/library/core/tests/panic/location.rs b/library/coretests/tests/panic/location.rs similarity index 100% rename from library/core/tests/panic/location.rs rename to library/coretests/tests/panic/location.rs diff --git a/library/core/tests/pattern.rs b/library/coretests/tests/pattern.rs similarity index 100% rename from library/core/tests/pattern.rs rename to library/coretests/tests/pattern.rs diff --git a/library/core/tests/pin.rs b/library/coretests/tests/pin.rs similarity index 100% rename from library/core/tests/pin.rs rename to library/coretests/tests/pin.rs diff --git a/library/core/tests/pin_macro.rs b/library/coretests/tests/pin_macro.rs similarity index 100% rename from library/core/tests/pin_macro.rs rename to library/coretests/tests/pin_macro.rs diff --git a/library/core/tests/ptr.rs b/library/coretests/tests/ptr.rs similarity index 100% rename from library/core/tests/ptr.rs rename to library/coretests/tests/ptr.rs diff --git a/library/core/tests/result.rs b/library/coretests/tests/result.rs similarity index 100% rename from library/core/tests/result.rs rename to library/coretests/tests/result.rs diff --git a/library/core/tests/simd.rs b/library/coretests/tests/simd.rs similarity index 100% rename from library/core/tests/simd.rs rename to library/coretests/tests/simd.rs diff --git a/library/core/tests/slice.rs b/library/coretests/tests/slice.rs similarity index 100% rename from library/core/tests/slice.rs rename to library/coretests/tests/slice.rs diff --git a/library/core/tests/str.rs b/library/coretests/tests/str.rs similarity index 100% rename from library/core/tests/str.rs rename to library/coretests/tests/str.rs diff --git a/library/core/tests/str_lossy.rs b/library/coretests/tests/str_lossy.rs similarity index 100% rename from library/core/tests/str_lossy.rs rename to library/coretests/tests/str_lossy.rs diff --git a/library/core/tests/task.rs b/library/coretests/tests/task.rs similarity index 100% rename from library/core/tests/task.rs rename to library/coretests/tests/task.rs diff --git a/library/core/tests/time.rs b/library/coretests/tests/time.rs similarity index 100% rename from library/core/tests/time.rs rename to library/coretests/tests/time.rs diff --git a/library/core/tests/tuple.rs b/library/coretests/tests/tuple.rs similarity index 100% rename from library/core/tests/tuple.rs rename to library/coretests/tests/tuple.rs diff --git a/library/core/tests/unicode.rs b/library/coretests/tests/unicode.rs similarity index 100% rename from library/core/tests/unicode.rs rename to library/coretests/tests/unicode.rs diff --git a/library/core/tests/waker.rs b/library/coretests/tests/waker.rs similarity index 100% rename from library/core/tests/waker.rs rename to library/coretests/tests/waker.rs diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index 275c0e803cb61..7e6a39a236e07 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -55,14 +55,14 @@ check-aux: $(BOOTSTRAP_ARGS) # Run standard library tests in Miri. $(Q)$(BOOTSTRAP) miri --stage 2 \ - library/core \ + library/coretests \ library/alloc \ $(BOOTSTRAP_ARGS) \ --no-doc # Some doctests use file system operations to demonstrate dealing with `Result`. $(Q)MIRIFLAGS="-Zmiri-disable-isolation" \ $(BOOTSTRAP) miri --stage 2 \ - library/core \ + library/coretests \ library/alloc \ $(BOOTSTRAP_ARGS) \ --doc diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index d8d862caf6a9a..f4a86e263967d 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -45,7 +45,7 @@ impl Step for Std { const DEFAULT: bool = true; fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.crate_or_deps("sysroot").path("library") + run.crate_or_deps("sysroot").crate_or_deps("coretests").path("library") } fn make_run(run: RunConfig<'_>) { diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 99b033db115ce..5e250d18ce6aa 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -2658,7 +2658,7 @@ impl Step for Crate { const DEFAULT: bool = true; fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.crate_or_deps("sysroot") + run.crate_or_deps("sysroot").crate_or_deps("coretests") } fn make_run(run: RunConfig<'_>) {