-
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 combining unsized locals and async #61335
Comments
Backtrace:
|
Notably, swapping the order of the |
@Centril sure, that's what I would expect. unsized locals can't be allowed across an |
Marking as "deferred" -- as unsized locals are not a stable feature, shouldn't be a blocker. |
triage: P-medium, via same logic employed above to mark as deferred. Removing nomination label. |
Triage: Still reproduces with nightly: $ cat repro.rs
#![feature(unsized_locals)]
async fn f() {}
async fn g(x: Box<dyn core::fmt::Display>) {
let _x = *x;
f().await;
}
fn main() {
let _a = g(Box::new(5));
}
$ rustc +nightly --edition 2018 repro.rs
error: internal compiler error: no errors encountered even though `delay_span_bug` issued
error: internal compiler error: unsized field in union
$ rustc +nightly -vV
rustc 1.74.0-nightly (1e746d774 2023-09-07)
binary: rustc
commit-hash: 1e746d7741d44551e9378daf13b8797322aa0b74
commit-date: 2023-09-07
host: x86_64-unknown-linux-gnu
release: 1.74.0-nightly
LLVM version: 17.0.0 |
It seemed clear to me that having an unsized local across a yield point cannot work.
Indeed, you get an ICE with (playground):
The text was updated successfully, but these errors were encountered: