diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-16 00:01:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-16 00:01:11 -0700 |
| commit | 4b4ea686ff3a0f44b5b2fef04a34ad27832617af (patch) | |
| tree | 25e13636c3edfcfa730f5ea0a054c00c8f785200 | |
| parent | 2872da361ee740ceb1828324c752ac93eafdeef9 (diff) | |
| parent | e158913f2b21dcbe98ca9c442235fb1d870f2288 (diff) | |
| download | rust-4b4ea686ff3a0f44b5b2fef04a34ad27832617af.tar.gz rust-4b4ea686ff3a0f44b5b2fef04a34ad27832617af.zip | |
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.
| -rw-r--r-- | src/libstd/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/libtest/Cargo.toml | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml index 490afb5a043..29893bd12f1 100644 --- a/src/libstd/Cargo.toml +++ b/src/libstd/Cargo.toml @@ -47,8 +47,6 @@ hermit-abi = { version = "0.1.14", features = ['rustc-dep-of-std'] } wasi = { version = "0.9.0", features = ['rustc-dep-of-std'], default-features = false } [features] -default = ["std_detect_file_io", "std_detect_dlsym_getauxval", "panic-unwind"] - backtrace = [ "backtrace_rs/dbghelp", # backtrace/symbolize on MSVC "backtrace_rs/libbacktrace", # symbolize on most platforms diff --git a/src/libtest/Cargo.toml b/src/libtest/Cargo.toml index 170fbb984cf..1667334871d 100644 --- a/src/libtest/Cargo.toml +++ b/src/libtest/Cargo.toml @@ -23,9 +23,12 @@ proc_macro = { path = "../libproc_macro" } # Forward features to the `std` crate as necessary [features] +default = ["std_detect_file_io", "std_detect_dlsym_getauxval", "panic-unwind"] backtrace = ["std/backtrace"] compiler-builtins-c = ["std/compiler-builtins-c"] llvm-libunwind = ["std/llvm-libunwind"] panic-unwind = ["std/panic_unwind"] panic_immediate_abort = ["std/panic_immediate_abort"] profiler = ["std/profiler"] +std_detect_file_io = ["std/std_detect_file_io"] +std_detect_dlsym_getauxval = ["std/std_detect_dlsym_getauxval"] |
