Refactor out common code into a IndexItem::new constructor#149452
Refactor out common code into a IndexItem::new constructor#149452rust-bors[bot] merged 1 commit intorust-lang:mainfrom
IndexItem::new constructor#149452Conversation
|
@lolbinarycat Felt like doing something semi-mechanical that doesn't require too much concentration, so thought I'd tackle the issue you opened. But TBH, after pulling out the common code into an |
This comment has been minimized.
This comment has been minimized.
32d0484 to
6cedf2c
Compare
This comment has been minimized.
This comment has been minimized.
|
It was working on #149460 that inspired this issue, and I agree that perhaps a substruct would be a better approach. |
6cedf2c to
acd4d7e
Compare
|
What do you think about how it looks now? @lolbinarycat |
|
the amount of times I typed "sub stract" instead of "sub struct"....... 😤 |
|
|
a39f59d to
86a2e85
Compare
|
rustbot has assigned @GuillaumeGomez. Use |
|
Well, done, not sure it's an improvement, but let's see what others think. |
|
Changes look good to me. So if it's ok with lolbinarycat and notriddle, you can r=us. |
This comment has been minimized.
This comment has been minimized.
|
Will need to be rebased on top of #149460 once that is merged. |
|
Triage: This seems close to having been merged. @lolbinarycat @notriddle Are you OK with r=GuillaumeGomez |
|
I would like to actually see the rebased code, as I believe it would not be entirely trivial, but I am still on board with this change. |
|
@lolbinarycat I agree. This looks like a good change, overall, and just needs rebased. |
86a2e85 to
0cb2e2f
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Here we go! (also, wasn't really around for the past two months or so, so - hey everyone :)) |
This comment has been minimized.
This comment has been minimized.
0cb2e2f to
a6c2f86
Compare
| let is_deprecated = item.is_deprecated(tcx); | ||
| let is_unstable = item.is_unstable(); | ||
| let index_item = IndexItem { | ||
| ty: item.type_(), |
There was a problem hiding this comment.
Why isn't ty: item.type_() a member of IndexItemInfo. It's common code shared between both spots where IndexItem is constructed, but it isn't factored out.
There was a problem hiding this comment.
Missed that, thanks!
a6c2f86 to
ab1500b
Compare
|
@bors r=notriddle,lolbinarycat |
…uwer Rollup of 12 pull requests Successful merges: - #149452 (Refactor out common code into a `IndexItem::new` constructor) - #155621 (Document #[diagnostic::on_move] in the unstable book.) - #155635 (delegation: rename `Self` generic param to `This` in recursive delegations) - #155730 (Some cleanups around per parent disambiguators) - #153537 (rustc_codegen_ssa: Define ELF flag value for sparc-unknown-linux-gnu) - #155219 (Do not suggest borrowing enclosing calls for nested where-clause obligations) - #155408 (rustdoc: Fix Managarm C Library name in cfg pretty printer) - #155571 (Enable AddressSanitizer on arm-unknown-linux-gnueabihf and armv7-unknown-linux-gnueabihf) - #155713 (test: Add a regression test for Apple platforms aborting on `free`) - #155723 (Fix tier level for 5 thumb bare-metal ARM targets) - #155735 (Fix typo by removing extra 'to') - #155736 (Remove `AllVariants` workaround for rust-analyzer)
|
⌛ Testing commit ab1500b with merge 1790f3a... Workflow: https://github.com/rust-lang/rust/actions/runs/24902498468 |
…le,lolbinarycat Refactor out common code into a `IndexItem::new` constructor #149404
|
@bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #155745. |
…uwer Rollup of 12 pull requests Successful merges: - #149452 (Refactor out common code into a `IndexItem::new` constructor) - #155621 (Document #[diagnostic::on_move] in the unstable book.) - #155635 (delegation: rename `Self` generic param to `This` in recursive delegations) - #155730 (Some cleanups around per parent disambiguators) - #153537 (rustc_codegen_ssa: Define ELF flag value for sparc-unknown-linux-gnu) - #155219 (Do not suggest borrowing enclosing calls for nested where-clause obligations) - #155408 (rustdoc: Fix Managarm C Library name in cfg pretty printer) - #155571 (Enable AddressSanitizer on arm-unknown-linux-gnueabihf and armv7-unknown-linux-gnueabihf) - #155713 (test: Add a regression test for Apple platforms aborting on `free`) - #155723 (Fix tier level for 5 thumb bare-metal ARM targets) - #155735 (Fix typo by removing extra 'to') - #155736 (Remove `AllVariants` workaround for rust-analyzer)
View all comments
#149404