diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-13 14:51:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-13 14:51:56 +0200 |
| commit | ca06f8896b62c58fe366bdecf2c237d8a195fd0f (patch) | |
| tree | b5e501c69e7276b2ec9319075ce9ec2417996565 /src/libstd/lib.rs | |
| parent | a0d05150c9f3297d558262e5637521d08f86d8de (diff) | |
| parent | 8eb7f36a3ba06dbea4a44254c3e2d92455ae150f (diff) | |
| download | rust-ca06f8896b62c58fe366bdecf2c237d8a195fd0f.tar.gz rust-ca06f8896b62c58fe366bdecf2c237d8a195fd0f.zip | |
Rollup merge of #61720 - alexcrichton:libstd-cfg-if-dep, r=sfackler
std: Remove internal definitions of `cfg_if!` macro This is duplicated in a few locations throughout the sysroot to work around issues with not exporting a macro in libstd but still wanting it available to sysroot crates to define blocks. Nowadays though we can simply depend on the `cfg-if` crate on crates.io, allowing us to use it from there!
Diffstat (limited to 'src/libstd/lib.rs')
| -rw-r--r-- | src/libstd/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index a3356e6be2c..e0ffc9ba92f 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -336,6 +336,12 @@ extern crate libc; #[allow(unused_extern_crates)] extern crate unwind; +// Only needed for now for the `std_detect` module until that crate changes to +// use `cfg_if::cfg_if!` +#[macro_use] +#[cfg(not(test))] +extern crate cfg_if; + // During testing, this crate is not actually the "real" std library, but rather // it links to the real std library, which was compiled from this same source // code. So any lang items std defines are conditionally excluded (or else they |
