-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler panicked while solving a Project Euler problem #110447
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
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Minimized: fn score(_: (usize, &str)) -> usize {
0
}
fn main() {
let mut names: Vec<&str> = vec![];
let result = names.iter().enumerate().map(score);
} On 1.42, this has a good error
On 1.68.2, this ICE's
This is because the comiler is allowed to coerce |
Interestingly, this fixed in nightly and beta
Given that beta gets promoted in 3 days, suspect it's not worth backpacking, but that's not my call to make |
Looks like a duplicate of #109361 |
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) ❄️
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
You can get the file
names.txt
from problem 22 of Project Euler, but that isn't required, because the panic occurs while compiling.Meta
rustc --version --verbose
:Error output
No error output. It panicked upon issuing the compile command.
Backtrace
Beta/Nightly
This code does not compile on the beta and nightly versions, but does not result in a panic, either:
but the error message is not clear. The function signatures do match. Curiously, if I write:
the compiler is fine with it.
The text was updated successfully, but these errors were encountered: