Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the "libc-extra-traits" feature. #1168

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ the functions in the `rustix::thread::futex` module instead.
`rustix::process::waitpid`'s return type changed from `WaitStatus` to
`(Pid, WaitStatus)`, to additionally return the pid of the child.

The "cc" feature is removed. It hasn't had any effect for several
major releases.
The "cc" and "libc-extra-traits" features are removed. The "cc" feature hasn't
had any effect for several major releases. If you need the traits provided
by "libc-extra-traits", you should instead depend on libc directly and enable
its "extra_traits" feature.

All explicitly deprecated functions and types have been removed. Their
deprecation messages will have identified alternatives.
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,10 @@ default = ["std", "use-libc-auxv"]

# This enables use of std. Disabling this enables `#![no_std]`, and requires
# Rust 1.64 or newer.
std = ["bitflags/std", "alloc", "libc?/std", "libc_errno?/std", "libc-extra-traits"]
std = ["bitflags/std", "alloc", "libc?/std", "libc_errno?/std"]

# Enable this to request the libc backend.
use-libc = ["libc_errno", "libc", "libc-extra-traits"]

# Enable `extra_traits` in libc types, to provide `Debug`, `Hash`, and other
# trait impls for libc types.
libc-extra-traits = ["libc?/extra_traits"]
use-libc = ["libc_errno", "libc"]

# Enable `rustix::event::*`.
event = []
Expand Down
2 changes: 1 addition & 1 deletion tests/time/dynamic_clocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn test_known_clocks() {
#[test]
fn test_dynamic_clocks() {
let file = std::fs::File::open("Cargo.toml").unwrap();
clock_gettime_dynamic(DynamicClockId::Dynamic(file.as_fd())).unwrap_err();
assert!(clock_gettime_dynamic(DynamicClockId::Dynamic(file.as_fd())).is_err());
}

#[cfg(linux_kernel)]
Expand Down
2 changes: 1 addition & 1 deletion tests/time/timespec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn test_timespec_layout() {
// Test that `Timespec` implements `Copy` and `Debug`.
let _y = Timespec { tv_sec, tv_nsec };
let _z = Timespec { tv_sec, tv_nsec };
dbg!(&x);
dbg!(x.tv_sec, x.tv_nsec);

#[cfg(not(target_os = "redox"))]
#[cfg(feature = "fs")]
Expand Down
Loading