Add proper cfg to keep only one AlignmentEnum definition for different target_pointer_widths#121753
Merged
bors merged 2 commits intorust-lang:masterfrom Mar 1, 2024
Merged
Conversation
Collaborator
0b0cde5 to
f36562e
Compare
cuviper
reviewed
Feb 28, 2024
library/core/src/ptr/alignment.rs
Outdated
| #[cfg(target_pointer_width = "16")] | ||
| #[derive(Copy, Clone, PartialEq, Eq)] | ||
| #[repr(u16)] | ||
| enum AlignmentEnum16 { |
Member
There was a problem hiding this comment.
If these are only used for the type AlignmentEnum alias above, I wonder why we shouldn't just define them as enum AlignmentEnum directly.
Member
|
Meta: in general, please add more descriptive context to your PR title and comment. A link is a useful supplement, but it should be made clear what we're changing and why, without needing to click around. |
f36562e to
61fcdf6
Compare
This comment has been minimized.
This comment has been minimized.
Member
|
Tests that happen to mention the numbered name in expected output will need to be updated. |
This comment has been minimized.
This comment has been minimized.
0d3954a to
88b9e7a
Compare
Member
|
Thanks! @bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 29, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#121326 (Detect empty leading where clauses on type aliases) - rust-lang#121464 (rustc: Fix wasm64 metadata object files) - rust-lang#121681 (Safe Transmute: Revise safety analysis) - rust-lang#121753 (Add proper cfg to keep only one AlignmentEnum definition for different target_pointer_widths) - rust-lang#121782 (allow statics pointing to mutable statics) - rust-lang#121798 (Fix links in rustc doc) - rust-lang#121806 (add const test for ptr::metadata) - rust-lang#121809 (Remove doc aliases to PATH) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 1, 2024
Rollup merge of rust-lang#121753 - mu001999:core/add_cfg, r=cuviper Add proper cfg to keep only one AlignmentEnum definition for different target_pointer_widths Detected by rust-lang#121752 Only one AlignmentEnum would be used with a specified target_pointer_width
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detected by #121752
Only one AlignmentEnum would be used with a specified target_pointer_width