Skip to content

Return a struct with named fields from hash_owner_nodes - #144822

Merged
bors merged 2 commits into
rust-lang:masterfrom
Zalathar:hash-owner-nodes
Aug 4, 2025
Merged

Return a struct with named fields from hash_owner_nodes#144822
bors merged 2 commits into
rust-lang:masterfrom
Zalathar:hash-owner-nodes

Conversation

@Zalathar

Copy link
Copy Markdown
Member

While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of hash_owner_nodes.

There are further changes that could potentially be made here (renaming things, Option<Hashes> instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.

@rustbot

Copy link
Copy Markdown
Collaborator

r? @SparrowLii

rustbot has assigned @SparrowLii.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 2, 2025

@compiler-errorscompiler-errors left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

@compiler-errors

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Aug 2, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit d3e597a has been approved by compiler-errors

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 3, 2025
…ler-errors
Return a struct with named fields from `hash_owner_nodes`
While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of `hash_owner_nodes`.
There are further changes that could potentially be made here (renaming things, `Option<Hashes>` instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.
@ZalatharZalathar mentioned this pull request Aug 3, 2025
bors added a commit that referenced this pull request Aug 3, 2025
Rollup of 14 pull requests
Successful merges:
- #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
- #143900 ([rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition)
- #144070 (Implement `hash_map` macro )
- #144322 (Add lint against dangling pointers from local variables)
- #144443 (Make target pointer width in target json an integer)
- #144667 (`AlignmentEnum` should just be `repr(usize)` now)
- #144779 (Implement debugging output of the bootstrap Step graph into a DOT file)
- #144790 (Multiple bounds checking elision failures)
- #144794 (Port `#[coroutine]` to the new attribute system)
- #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits)
- #144816 (Update E0562 to account for the new impl trait positions)
- #144822 (Return a struct with named fields from `hash_owner_nodes`)
- #144824 (Updated test links in compiler)
- #144829 (Use full flag name in strip command for Darwin)
r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 3, 2025
…ler-errors
Return a struct with named fields from `hash_owner_nodes`
While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of `hash_owner_nodes`.
There are further changes that could potentially be made here (renaming things, `Option<Hashes>` instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.
@ZalatharZalathar mentioned this pull request Aug 3, 2025
bors added a commit that referenced this pull request Aug 3, 2025
Rollup of 13 pull requests
Successful merges:
- #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
- #143900 ([rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition)
- #144070 (Implement `hash_map` macro )
- #144322 (Add lint against dangling pointers from local variables)
- #144443 (Make target pointer width in target json an integer)
- #144667 (`AlignmentEnum` should just be `repr(usize)` now)
- #144790 (Multiple bounds checking elision failures)
- #144794 (Port `#[coroutine]` to the new attribute system)
- #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits)
- #144816 (Update E0562 to account for the new impl trait positions)
- #144822 (Return a struct with named fields from `hash_owner_nodes`)
- #144824 (Updated test links in compiler)
- #144829 (Use full flag name in strip command for Darwin)
r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 3, 2025
…ler-errors
Return a struct with named fields from `hash_owner_nodes`
While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of `hash_owner_nodes`.
There are further changes that could potentially be made here (renaming things, `Option<Hashes>` instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.
@ZalatharZalathar mentioned this pull request Aug 3, 2025
bors added a commit that referenced this pull request Aug 3, 2025
Rollup of 13 pull requests
Successful merges:
- #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
- #144070 (Implement `hash_map` macro )
- #144322 (Add lint against dangling pointers from local variables)
- #144667 (`AlignmentEnum` should just be `repr(usize)` now)
- #144678 (Make no_mangle on foreign items explicit instead of implicit)
- #144790 (Multiple bounds checking elision failures)
- #144794 (Port `#[coroutine]` to the new attribute system)
- #144805 (compiletest: Preliminary cleanup of `ProcRes` printing/unwinding)
- #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits)
- #144816 (Update E0562 to account for the new impl trait positions)
- #144822 (Return a struct with named fields from `hash_owner_nodes`)
- #144824 (Updated test links in compiler)
- #144829 (Use full flag name in strip command for Darwin)
r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 3, 2025
…ler-errors
Return a struct with named fields from `hash_owner_nodes`
While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of `hash_owner_nodes`.
There are further changes that could potentially be made here (renaming things, `Option<Hashes>` instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.
@ZalatharZalathar mentioned this pull request Aug 3, 2025
bors added a commit that referenced this pull request Aug 3, 2025
Rollup of 13 pull requests
Successful merges:
- #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
- #144070 (Implement `hash_map` macro )
- #144322 (Add lint against dangling pointers from local variables)
- #144667 (`AlignmentEnum` should just be `repr(usize)` now)
- #144706 (Do not give function allocations alignment in consteval and Miri.)
- #144790 (Multiple bounds checking elision failures)
- #144794 (Port `#[coroutine]` to the new attribute system)
- #144805 (compiletest: Preliminary cleanup of `ProcRes` printing/unwinding)
- #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits)
- #144816 (Update E0562 to account for the new impl trait positions)
- #144822 (Return a struct with named fields from `hash_owner_nodes`)
- #144824 (Updated test links in compiler)
- #144829 (Use full flag name in strip command for Darwin)
r? `@ghost`
`@rustbot` modify labels: rollup
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Aug 3, 2025
…ler-errors
Return a struct with named fields from `hash_owner_nodes`
While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of `hash_owner_nodes`.
There are further changes that could potentially be made here (renaming things, `Option<Hashes>` instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Aug 3, 2025
…ler-errors
Return a struct with named fields from `hash_owner_nodes`
While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of `hash_owner_nodes`.
There are further changes that could potentially be made here (renaming things, `Option<Hashes>` instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.
bors added a commit that referenced this pull request Aug 3, 2025
Rollup of 11 pull requests
Successful merges:
- #142678 (Misc cleanups of `generic_arg_infer` related HIR logic)
- #144650 (Additional tce tests)
- #144738 (Remove the omit_gdb_pretty_printer_section attribute)
- #144790 (Multiple bounds checking elision failures)
- #144805 (compiletest: Preliminary cleanup of `ProcRes` printing/unwinding)
- #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits)
- #144816 (Update E0562 to account for the new impl trait positions)
- #144822 (Return a struct with named fields from `hash_owner_nodes`)
- #144824 (Updated test links in compiler)
- #144829 (Use full flag name in strip command for Darwin)
- #144843 (Weekly `cargo update`)
Failed merges:
- #144794 (Port `#[coroutine]` to the new attribute system)
r? `@ghost`
`@rustbot` modify labels: rollup
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Aug 3, 2025
…ler-errors
Return a struct with named fields from `hash_owner_nodes`
While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of `hash_owner_nodes`.
There are further changes that could potentially be made here (renaming things, `Option<Hashes>` instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.
This was referenced Aug 3, 2025
bors added a commit that referenced this pull request Aug 3, 2025
Rollup of 12 pull requests
Successful merges:
- #142678 (Misc cleanups of `generic_arg_infer` related HIR logic)
- #144070 (Implement `hash_map` macro )
- #144738 (Remove the omit_gdb_pretty_printer_section attribute)
- #144790 (Multiple bounds checking elision failures)
- #144805 (compiletest: Preliminary cleanup of `ProcRes` printing/unwinding)
- #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits)
- #144816 (Update E0562 to account for the new impl trait positions)
- #144822 (Return a struct with named fields from `hash_owner_nodes`)
- #144824 (Updated test links in compiler)
- #144829 (Use full flag name in strip command for Darwin)
- #144843 (Weekly `cargo update`)
- #144851 (Forbid tail calling intrinsics)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 5b751d7 into rust-lang:masterAug 4, 2025
10 checks passed
@rustbotrustbot added this to the 1.91.0 milestone Aug 4, 2025
rust-timer added a commit that referenced this pull request Aug 4, 2025
Rollup merge of #144822 - Zalathar:hash-owner-nodes, r=compiler-errors
Return a struct with named fields from `hash_owner_nodes`
While looking through this code for other reasons, I noticed a nice opportunity to return a struct with named fields instead of a tuple. The first patch also introduces an early-return to flatten the rest of `hash_owner_nodes`.
There are further changes that could potentially be made here (renaming things, `Option<Hashes>` instead of optional fields), but I'm not deeply familiar with this code so I didn't want to disturb the calling code too much.
@Zalathar
Zalathar deleted the hash-owner-nodes branch August 4, 2025 01:27
github-actionsBot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Aug 4, 2025
Rollup of 12 pull requests
Successful merges:
- rust-lang/rust#142678 (Misc cleanups of `generic_arg_infer` related HIR logic)
- rust-lang/rust#144070 (Implement `hash_map` macro )
- rust-lang/rust#144738 (Remove the omit_gdb_pretty_printer_section attribute)
- rust-lang/rust#144790 (Multiple bounds checking elision failures)
- rust-lang/rust#144805 (compiletest: Preliminary cleanup of `ProcRes` printing/unwinding)
- rust-lang/rust#144808 (`Interner` arg to `EarlyBinder` does not affect auto traits)
- rust-lang/rust#144816 (Update E0562 to account for the new impl trait positions)
- rust-lang/rust#144822 (Return a struct with named fields from `hash_owner_nodes`)
- rust-lang/rust#144824 (Updated test links in compiler)
- rust-lang/rust#144829 (Use full flag name in strip command for Darwin)
- rust-lang/rust#144843 (Weekly `cargo update`)
- rust-lang/rust#144851 (Forbid tail calling intrinsics)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Zalathar@rustbot@compiler-errors@bors@SparrowLii