Skip to content

Expand docs on rustc_abi::Variants - #163073

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
ada4a:push-sqkvvqyooqky
Sep 21, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
ada4a:push-sqkvvqyooqky

Conversation

@ada4a

@ada4a ada4a commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

View all comments

This information is scattered throughout the comments at the use sites. I thought I'd consolidate it.

cc @RalfJung since you seem to be the one who wrote most of these comments

@rustbot rustbot 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 Sep 20, 2026
@rustbot

rustbot commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

r? @oli-obk

rustbot has assigned @oli-obk.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 77 candidates
  • Random selection from 20 candidates

@RalfJung RalfJung left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds mostly right. :)

View changes since this review

Comment thread compiler/rustc_abi/src/lib.rs Outdated
Comment thread compiler/rustc_abi/src/lib.rs Outdated
@ada4a ada4a changed the title Expand docs on rustc_abi::Variants::Single Expand docs on rustc_abi::Variants Sep 20, 2026
@ada4a

ada4a commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Pulled out the enum/coroutine explanation to the top, to avoid repeating it in each variant, with a FIXME for coroutines

Comment thread compiler/rustc_abi/src/lib.rs Outdated
@RalfJung

Copy link
Copy Markdown
Member

Pulled out the enum/coroutine explanation to the top, to avoid repeating it in each variant, with a FIXME for coroutines

I have to admit I'm not a fan of that approach.

I would simply define Single as all inhabited types that are not Multiple, that also avoids the redundancy. ;)

@ada4a

ada4a commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Pulled out the enum/coroutine explanation to the top, to avoid repeating it in each variant, with a FIXME for coroutines

I have to admit I'm not a fan of that approach.

I would simply define Single as all inhabited types that are not Multiple, that also avoids the redundancy. ;)

Hm, let me try that

@ada4a

ada4a commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Hm, one downside of that is that the explanation of Single.index becomes a bit awkward: currently, I "attach" it to the two described cases, but with the change you propose, those would no longer be present

@oli-obk oli-obk assigned RalfJung and unassigned oli-obk Sep 21, 2026
Comment thread compiler/rustc_abi/src/lib.rs Outdated
@RalfJung

Copy link
Copy Markdown
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 21, 2026
@rustbot

rustbot commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

This information is scattered throughout the comments at the use sites.
I thought I'd consolidate it.
@ada4a

ada4a commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

Fixed the coroutine thing, and moved the enum description back into each variant. It ended up a bit more verbose that one would hope maybe, but imo that's justified, because Variants is one of the more important data structures of the crate.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 21, 2026
@RalfJung

Copy link
Copy Markdown
Member

Thanks :)

@bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 286e3c3 has been approved by RalfJung

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

Reason for tree closure: babysitting some spurious failures

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 21, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 21, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 21, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #162948 (Set target-abi module flag for LoongArch targets)
 - #162600 (Make the last non-breaking box impl generalizations)
 - #163031 (Use newer `make` version when building GCC)
 - #163054 (Use verbose suggestion for method written as function)
 - #163073 (Expand docs on `rustc_abi::Variants`)
@rust-bors
rust-bors Bot merged commit 46e4213 into rust-lang:main Sep 21, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 21, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 21, 2026
Rollup merge of #163073 - ada4a:push-sqkvvqyooqky, r=RalfJung

Expand docs on `rustc_abi::Variants`

This information is scattered throughout the comments at the use sites. I thought I'd consolidate it.

cc @RalfJung since you seem to be the one who wrote most of these comments
@ada4a
ada4a deleted the push-sqkvvqyooqky branch September 21, 2026 19:37
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Sep 22, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#162948 (Set target-abi module flag for LoongArch targets)
 - rust-lang/rust#162600 (Make the last non-breaking box impl generalizations)
 - rust-lang/rust#163031 (Use newer `make` version when building GCC)
 - rust-lang/rust#163054 (Use verbose suggestion for method written as function)
 - rust-lang/rust#163073 (Expand docs on `rustc_abi::Variants`)
pull Bot pushed a commit to xtqqczze/rust-lang-rustc-dev-guide that referenced this pull request Sep 30, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#162948 (Set target-abi module flag for LoongArch targets)
 - rust-lang/rust#162600 (Make the last non-breaking box impl generalizations)
 - rust-lang/rust#163031 (Use newer `make` version when building GCC)
 - rust-lang/rust#163054 (Use verbose suggestion for method written as function)
 - rust-lang/rust#163073 (Expand docs on `rustc_abi::Variants`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant 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.

4 participants