Skip to content

Commit 4b4ea68

Browse files
authored
Rollup merge of #74377 - alexcrichton:test-default, r=Mark-Simulacrum
Move libstd's default feature to libtest This commit makes it so `std` no longer has a `default` feature, but instead the `test` crate has a `default` feature doing the same thing. The purpose of this commit is to allow Cargo's `-Zbuild-std` command, which could customize the features of the standard library, to handle the `default` feature for libstd. Currently Cargo's `-Zbuild-std` support starts at libtests's manifest as the entry point to the std set of crates.
2 parents 2872da3 + e158913 commit 4b4ea68

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/libstd/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ hermit-abi = { version = "0.1.14", features = ['rustc-dep-of-std'] }
4747
wasi = { version = "0.9.0", features = ['rustc-dep-of-std'], default-features = false }
4848

4949
[features]
50-
default = ["std_detect_file_io", "std_detect_dlsym_getauxval", "panic-unwind"]
51-
5250
backtrace = [
5351
"backtrace_rs/dbghelp", # backtrace/symbolize on MSVC
5452
"backtrace_rs/libbacktrace", # symbolize on most platforms

src/libtest/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ proc_macro = { path = "../libproc_macro" }
2323

2424
# Forward features to the `std` crate as necessary
2525
[features]
26+
default = ["std_detect_file_io", "std_detect_dlsym_getauxval", "panic-unwind"]
2627
backtrace = ["std/backtrace"]
2728
compiler-builtins-c = ["std/compiler-builtins-c"]
2829
llvm-libunwind = ["std/llvm-libunwind"]
2930
panic-unwind = ["std/panic_unwind"]
3031
panic_immediate_abort = ["std/panic_immediate_abort"]
3132
profiler = ["std/profiler"]
33+
std_detect_file_io = ["std/std_detect_file_io"]
34+
std_detect_dlsym_getauxval = ["std/std_detect_dlsym_getauxval"]

0 commit comments

Comments
 (0)