-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE when using Matching, Async and Indexing #78366
Comments
This is very reminiscent of #72651 (await in if guard in match statement) |
MCVE: async fn bar() -> &'static [bool] {
unimplemented!()
}
async fn foo(status: usize) {
match status {
x if bar().await[x] => {}
_ => {}
}
} Yeah, very #72651. |
Thank you for reducing this further. Totally forgot that I could just declare my own async function this way! But I do understand correctly that the linked example is just related, not the same? (Since it's still occuring in latest nightly and the linked issue seemes to be already fixed) |
Yeah, just related - my immediate guess is this is some case that was missed in the fix for that issue. The difference appears to be that |
Another example: async fn bar() -> usize {
unimplemented!()
}
async fn foo(status: usize) {
match status {
x if bar().await == (x + 1) => {}
_ => {}
}
} Any usage of |
@rustbot claim |
Assigning |
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: