Uh oh!
There was an error while loading. Please reload this page.
Refactor out common code into a IndexItem::new constructor - #149452
Conversation
@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
6cedf2cCompareUh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
lolbinarycat
commented
Nov 29, 2025
It was working on #149460 that inspired this issue, and I agree that perhaps a substruct would be a better approach. |
6cedf2c to
acd4d7eCompareyotamofek
commented
Dec 12, 2025
What do you think about how it looks now? @lolbinarycat |
yotamofek
commented
Dec 12, 2025
the amount of times I typed "sub stract" instead of "sub struct"....... 😤 |
lolbinarycat
commented
Dec 14, 2025
|
a39f59d to
86a2e85Comparerustbot
commented
Dec 15, 2025
rustbot has assigned @GuillaumeGomez. Use |
yotamofek
commented
Dec 15, 2025
Well, done, not sure it's an improvement, but let's see what others think. |
GuillaumeGomez
commented
Dec 16, 2025
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.
lolbinarycat
commented
Jan 28, 2026
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 |
lolbinarycat
commented
Apr 17, 2026
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. |
notriddle
commented
Apr 18, 2026
@lolbinarycat I agree. This looks like a good change, overall, and just needs rebased. |
86a2e85 to
0cb2e2fComparerustbot
commented
Apr 18, 2026
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. |
yotamofek
commented
Apr 18, 2026
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
a6c2f86Compare| 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.
a6c2f86 to
ab1500bComparenotriddle
commented
Apr 24, 2026
@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
JonathanBrouwer
commented
Apr 24, 2026
@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)
Uh oh!
There was an error while loading. Please reload this page.
View all comments
#149404