-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
compiler panic on "this enum variant takes 1 argument but 2 arguments were supplied" #94444
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Provide a minimized example based on the given code. fn main() {
let vector = vec![1];
let _ = vector
.iter()
.map(|_| -> Option<(i32, i32)> {
let t = vec![1];
// It's expected to be a compile error
// A correct version: Some((t.into_iter().next().unwrap(), 1))
Some(t.into_iter().next().unwrap(), 1)
})
.collect::<Vec<_>>();
} Compile DetailsRustc version
Compiler Output
|
searched nightlies: from nightly-2022-01-27 to nightly-2022-01-29 bisected with cargo-bisect-rustc v0.6.1Host triple: x86_64-pc-windows-msvc cargo bisect-rustc --regress ice --start 2022-01-27 --end 2022-01-29 |
This is fixed by #94438, I think. I will check later. |
Yes, not crashing anymore =)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
https://github.com/leoleoasd/ptranse/blob/6e7d647a2ea77af904c461df7df6a9067c76809f/src/process.rs#L90
Sorry, I'm new to rust and I can't provide a more minimized example. Commenting this line out and everything works fine.
Meta
rustc --version --verbose
:Error output
Backtrace
Other information
rustc 1.58.0-nightly
doesn't have this bug.The text was updated successfully, but these errors were encountered: