Remove use of `unstable` feature

This commit is contained in:
Joe Richey 2019-07-14 22:10:05 -07:00
parent 1b4747e77b
commit df34d17bd9
3 changed files with 2 additions and 9 deletions

View File

@ -26,9 +26,8 @@ rustc-std-workspace-core = { version = "1.0.0", optional = true }
default = ["std"]
std = []
align = []
rustc-dep-of-std = ['align', 'rustc-std-workspace-core', 'unstable']
rustc-dep-of-std = ['align', 'rustc-std-workspace-core']
extra_traits = []
unstable = []
# use_std is deprecated, use `std` instead
use_std = [ 'std' ]

View File

@ -35,11 +35,6 @@ libc = "0.2"
* `extra_traits`: all `struct`s implemented in `libc` are `Copy` and `Clone`.
This feature derives `Debug`, `Eq`, `Hash`, and `PartialEq`.
* `unstable`: This feature enables `libc` bindings that are only possible with
unstable Rust features. Right now, this just for
[`extern` `#[thread_local]` statics](https://github.com/rust-lang/rust/issues/29594)
on certain platforms. Requires nightly.
* **deprecated**: `use_std` is deprecated, and is equivalent to `std`.
## Rust version support

View File

@ -7,7 +7,6 @@ fn main() {
rustc_minor_version().expect("Failed to get rustc version");
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let align_cargo_feature = env::var("CARGO_FEATURE_ALIGN").is_ok();
let unstable_cargo_feature = env::var("CARGO_FEATURE_UNSTABLE").is_ok();
if env::var("CARGO_FEATURE_USE_STD").is_ok() {
println!(
@ -55,7 +54,7 @@ fn main() {
}
// #[thread_local] is currently unstable
if unstable_cargo_feature || rustc_dep_of_std {
if rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_thread_local");
}
}