Address unused tuple struct fields in the standard library#118383
Merged
bors merged 1 commit intorust-lang:masterfrom Nov 29, 2023
Merged
Address unused tuple struct fields in the standard library#118383bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
m-ou-se
approved these changes
Nov 28, 2023
| /// projection invariance of `<T as Pointee>::Metadata`. | ||
| #[repr(transparent)] | ||
| struct WithOpaqueHeader(NonNull<u8>); | ||
| struct WithOpaqueHeader(#[allow(unused_tuple_struct_fields)] NonNull<u8>); |
Member
There was a problem hiding this comment.
For future readers of this code, it's probably helpful to add a comment explaining why this field is 'unused'.
Suggested change
| struct WithOpaqueHeader(#[allow(unused_tuple_struct_fields)] NonNull<u8>); | |
| #[allow(unused_tuple_struct_fields)] // Field only used through `WithHeader` type above. | |
| struct WithOpaqueHeader(NonNull<u8>); |
31abe0a to
115eac0
Compare
Member
Author
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2023
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#118342 (Dont suggest `!` for path in function call if it has generic args) - rust-lang#118383 (Address unused tuple struct fields in the standard library) - rust-lang#118401 (`rustc_ast_lowering` cleanups) - rust-lang#118409 (format_foreign.rs: unwrap return Option value for `fn position`, as it always returns Some) - rust-lang#118413 (Fix the issue of suggesting unwrap/expect for shorthand field) - rust-lang#118425 (Update cargo) - rust-lang#118429 (Fix a typo in a `format_args!` note) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2023
Rollup merge of rust-lang#118383 - shepmaster:unused-tuple-struct-field-cleanup-stdlib, r=m-ou-se Address unused tuple struct fields in the standard library
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.
No description provided.