-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
struct update syntax causes ICE #91502
Comments
It's likely possible to minimize this further; the snippet posted is just a sanitized version of the actual code that caused the issue. Changing the fn with_a(a: u64) -> Foo {
let bar = BAR.get().unwrap();
Foo {
a,
..bar
}
} |
Slightly further minimized: use once_cell::sync::OnceCell;
struct Bar {}
static BAR: OnceCell<Bar> = OnceCell::new();
fn main() {
let b = Bar {
..BAR.get().unwrap()
};
} |
I'd like to take a look at this, I'll take a stab at it tonight. @rustbot claim |
I git-bisected this down to 926892d (#90035). We have a "type changing struct-update" here because we're doing I can demote this |
I run into this while fuzzing, so if you need another example: fn main() {
Ok { ..0 > 0 }
} |
Fixed by #92112 |
Code
Playground link
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: