-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miscompilation when awaiting generator containing an enum with niche at least [0, 1] #90038
Comments
Note that this regression is in the newly-promoted-to-beta 1.57, not 1.56 which is being released as stable this week. |
Minimized: #[repr(u32)]
pub enum Foo {
A = 2,
}
pub enum Bar {
A(Foo),
B,
C,
}
fn main() {
match Bar::A(Foo::A) {
Bar::A(_) => (),
_ => unreachable!(),
}
} |
@rustbot claim |
@rustbot label: -A-async-await |
Assigning |
(Posted in the fix PR as well for redundancy) For the record, while I may have seen #87794 (comment) I do not recall ever reviewing the change it links to (52f4be9), which is where the bug was introduced (I was tipped off by the closures which did not exist in the version of that PR I reviewed). |
the fix still needs a backport |
This was backported in #90151. |
Code
This code: (playground)
Panics with the message
MaybeDone polled after value taken
from inside futures-rs. The code driving this particular object is also in futures-rs inside the Join combinator, but this code couldn't possibly result in the panic that we see. That would require the Join future to get polled after it was completed, but that future is onlyawait
ed, so this should never happen.This is a regression from stable to beta, bisected to PR #87794. It still exists in nightly.
Backtrace
Backtrace
@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
The text was updated successfully, but these errors were encountered: