Open
Description
openedon Oct 27, 2023
While working on this PR, I wrote the following code:
#[cfg_attr(feature = "zerocopy", derive(FromZeroes, FromBytes, AsBytes))]
#[deprecated(
since = "0.2.55",
note = "Use the `mach2` crate instead",
)]
pub struct mach_timebase_info {
pub numer: u32,
pub denom: u32,
}
Running cargo check --features zerocopy
on cargo 1.74.0-nightly (b4ddf95ad 2023-09-18)
, I get the following warning:
warning: use of deprecated struct `unix::bsd::apple::mach_timebase_info`: Use the `mach2` crate instead
--> src/unix/bsd/apple/mod.rs:306:16
|
306 | pub struct mach_timebase_info {
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
Mentoring instructions
- Figure out the conditions under which this warning is emitted
- Write a test that reproduces this behavior
- Modify our derives as needed to not generate this warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment