-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use #[derive]
for Copy
/Clone
in s!
and friends
#4038
Conversation
Allows use of `#[cfg]` to skip items in an `s!` block without creating invalid, orphaned `impl` blocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally I'd like to backport this but that can't happen until we bump the MSRV of libc-0.2 (hopefully soon).
Also can't merge this right away due to a CI failure in recent nightly, LGTM though.
@rustbot label +stable-blocked
How does this change impact the MSRV? (I tried building with the currently declared 1.13.0 but that is completely broken, it can't even resolve the Cargo.toml since some versions of the |
For 0.2 we test down to 1.19 - do the There is no problem for |
Deriving I'm pretty sure this change can be ported to the 0.2 branch with the above caveat if you wished. |
Allows use of `#[cfg]` to skip items in an `s!` block without creating invalid, orphaned `impl` blocks. (backport <rust-lang#4038>) (cherry picked from commit 44c548d)
(backport <rust-lang#4038>) (cherry picked from commit 73ce07c)
Allows use of `#[cfg]` to skip items in an `s!` block without creating invalid, orphaned `impl` blocks. (backport <rust-lang#4038>) (cherry picked from commit 44c548d)
(backport <rust-lang#4038>) (cherry picked from commit 73ce07c)
Allows use of `#[cfg]` to skip items in an `s!` block without creating invalid, orphaned `impl` blocks. (backport <rust-lang#4038>) (cherry picked from commit 44c548d)
(backport <rust-lang#4038>) (cherry picked from commit 73ce07c)
Allows use of `#[cfg]` to skip items in an `s!` block without creating invalid, orphaned `impl` blocks. (backport <rust-lang#4038>) (cherry picked from commit 44c548d)
(backport <rust-lang#4038>) (cherry picked from commit 73ce07c)
Since [1] we use derive macros rather than manually implementing `Clone` and `Copy`. However, this caused the build in `std` to start failing since the `core` prelude is not available. This provides the derive macros as well as `derive` itself. Resolve this by using complete paths. Additionally allow `internal_features` to suppress the warning using `link_cfg`. Link: rust-lang#4038 [1]
Since [1] we use derive macros rather than manually implementing `Clone` and `Copy`. However, this caused the build in `std` to start failing since the `core` prelude is not available. This provides the derive macros as well as `derive` itself. Resolve this by using complete paths. Additionally allow `internal_features` to suppress the warning using `link_cfg`, and change to using global paths for all uses of `core`. Link: rust-lang#4038 [1]
Since [1] we use derive macros rather than manually implementing `Clone` and `Copy`. However, this caused the build in `std` to start failing since the `core` prelude is not available. This provides the derive macros as well as `derive` itself. Resolve this by using complete paths. Additionally allow `internal_features` to suppress the warning using `link_cfg`, and change to using global paths for all uses of `core`. Link: rust-lang#4038 [1] (backport <rust-lang#4158>) (cherry picked from commit d69ad56)
Description
Extracted from #3261 as a pre-requisite change.
Allows use of
#[cfg]
to skip items in ans!
block without creating invalid, orphanedimpl
blocks.Checklist
Relevant tests inlibc-test/semver
have been updatedNo placeholder or unstable values like*LAST
or*MAX
are included (see #3131)cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI