Remove use of `unstable` feature
This commit is contained in:
parent
1b4747e77b
commit
df34d17bd9
|
@ -26,9 +26,8 @@ rustc-std-workspace-core = { version = "1.0.0", optional = true }
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = []
|
std = []
|
||||||
align = []
|
align = []
|
||||||
rustc-dep-of-std = ['align', 'rustc-std-workspace-core', 'unstable']
|
rustc-dep-of-std = ['align', 'rustc-std-workspace-core']
|
||||||
extra_traits = []
|
extra_traits = []
|
||||||
unstable = []
|
|
||||||
# use_std is deprecated, use `std` instead
|
# use_std is deprecated, use `std` instead
|
||||||
use_std = [ 'std' ]
|
use_std = [ 'std' ]
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,6 @@ libc = "0.2"
|
||||||
* `extra_traits`: all `struct`s implemented in `libc` are `Copy` and `Clone`.
|
* `extra_traits`: all `struct`s implemented in `libc` are `Copy` and `Clone`.
|
||||||
This feature derives `Debug`, `Eq`, `Hash`, and `PartialEq`.
|
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`.
|
* **deprecated**: `use_std` is deprecated, and is equivalent to `std`.
|
||||||
|
|
||||||
## Rust version support
|
## Rust version support
|
||||||
|
|
3
build.rs
3
build.rs
|
@ -7,7 +7,6 @@ fn main() {
|
||||||
rustc_minor_version().expect("Failed to get rustc version");
|
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 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 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() {
|
if env::var("CARGO_FEATURE_USE_STD").is_ok() {
|
||||||
println!(
|
println!(
|
||||||
|
@ -55,7 +54,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[thread_local] is currently unstable
|
// #[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");
|
println!("cargo:rustc-cfg=libc_thread_local");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue