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

Don't generate warning when deriving on deprecated type #553

Open
1 of 3 tasks
joshlf opened this issue Oct 27, 2023 · 0 comments
Open
1 of 3 tasks

Don't generate warning when deriving on deprecated type #553

joshlf opened this issue Oct 27, 2023 · 0 comments
Labels
experience-medium This issue is of medium difficulty, and requires some experience help wanted Extra attention is needed

Comments

@joshlf
Copy link
Member

joshlf commented 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

@joshlf joshlf added help wanted Extra attention is needed experience-medium This issue is of medium difficulty, and requires some experience labels Oct 27, 2023
joshlf added a commit that referenced this issue Oct 27, 2023
Makes progress on #553, although we still need to figure out how to
reproduce the bug that caused that issue in the first place, and add a
test that exercises the same behavior (ie, fails without this commit).
joshlf added a commit that referenced this issue Oct 27, 2023
Makes progress on #553, although we still need to figure out how to
reproduce the bug that caused that issue in the first place, and add a
test that exercises the same behavior (ie, fails without this commit).
joshlf added a commit that referenced this issue Oct 27, 2023
Makes progress on #553, although we still need to figure out how to
reproduce the bug that caused that issue in the first place, and add a
test that exercises the same behavior (ie, fails without this commit).

Release 0.7.16.
github-merge-queue bot pushed a commit that referenced this issue Oct 27, 2023
Makes progress on #553, although we still need to figure out how to
reproduce the bug that caused that issue in the first place, and add a
test that exercises the same behavior (ie, fails without this commit).

Release 0.7.16.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experience-medium This issue is of medium difficulty, and requires some experience help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant