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

Fix a new dead_code warning. #981

Merged
merged 4 commits into from
Jan 11, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/backend/libc/time/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ pub(crate) fn clock_gettime_dynamic(id: DynamicClockId<'_>) -> io::Result<Timesp
DynamicClockId::Tai => c::CLOCK_TAI,

#[cfg(any(
freebsdlike,
linux_kernel,
target_os = "freebsd",
target_os = "fuchsia",
target_os = "openbsd"
))]
Expand Down
1 change: 1 addition & 0 deletions src/backend/linux_raw/reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub(super) trait FromAsm: private::Sealed {
/// pointer types. They need a type to point to, so we define a custom private
/// type, to prevent it from being used for anything else.
#[repr(transparent)]
#[allow(dead_code)]
pub(super) struct Opaque(c::c_void);

// Argument numbers.
Expand Down
2 changes: 1 addition & 1 deletion src/clockid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ pub enum DynamicClockId<'a> {

/// `CLOCK_BOOTTIME`
#[cfg(any(
freebsdlike,
linux_kernel,
target_os = "freebsd",
target_os = "fuchsia",
target_os = "openbsd"
))]
Expand Down
2 changes: 1 addition & 1 deletion tests/time/clocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use rustix::time::{clock_gettime, ClockId};
/// Attempt to test that the boot clock is monotonic. Time may or may not
/// advance, but it shouldn't regress.
#[cfg(any(
freebsdlike,
linux_kernel,
target_os = "freebsd",
target_os = "fuchsia",
target_os = "openbsd"
))]
Expand Down
Loading