Conversation
|
r? @oli-obk rustbot has assigned @oli-obk. Use Why was this reviewer chosen?The reviewer was selected based on:
|
ac095a8 to
40bf402
Compare
rustc_abi::Variants::Singlerustc_abi::Variants
40bf402 to
d28e6cb
Compare
|
Pulled out the enum/coroutine explanation to the top, to avoid repeating it in each variant, with a FIXME for coroutines |
d28e6cb to
7ddae72
Compare
I have to admit I'm not a fan of that approach. I would simply define |
This information is scattered throughout the comments at the use sites. I thought I'd consolidate it.
7ddae72 to
56409a7
Compare
Hm, let me try that |
|
Hm, one downside of that is that the explanation of |
| // FIXME: unclear if coroutines actually obey the same rules as enums, or just always have | ||
| // [`Self::Multiple`] |
There was a problem hiding this comment.
There was a problem hiding this comment.
Yeah looks like even the simplest async block has 3 states
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=38679eb35c0c5ac1ab8d7e3b2aa07ee1
There was a problem hiding this comment.
I tried looking for the code that does uninhabited variant pruning for enums (to see if it applies to coroutines, too), but wasn't able to find it... So I guess I'll go with coroutines always being Multiple
There was a problem hiding this comment.
I think it is this function
rust/compiler/rustc_abi/src/layout.rs
Line 341 in 6da3077
That is only called for ADTs.
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
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