-
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
ICE on checking function arguments #96638
Comments
Info: Does this ICE only occur in the error path? Not sure what's going on exactly. The index should only be less than than the provided args length:
I think the code in Kind of interesting this didn't break before this. The |
When fixing the underlying issue, the logic changes from #96646 should be reverted, while keeping the regression test. |
Mitigate impact of subtle invalid call suggestion logic There's some subtle interaction between inferred expressions being passed as an argument to fn calls with fewer than expected arguments. To avoid the ICE, I'm changing indexing operations with `.get(idx)`, but the underlying logic still needs to be audited as it was written with the assumption that `final_arg_types` and `provided_args` have the right length. Address rust-lang#96638.
Mitigate impact of subtle invalid call suggestion logic There's some subtle interaction between inferred expressions being passed as an argument to fn calls with fewer than expected arguments. To avoid the ICE, I'm changing indexing operations with `.get(idx)`, but the underlying logic still needs to be audited as it was written with the assumption that `final_arg_types` and `provided_args` have the right length. Address rust-lang#96638.
Rollup of 5 pull requests Successful merges: - rust-lang#93661 (Add missing rustc arg docs) - rust-lang#96674 (docs: add link explaining variance to NonNull docs) - rust-lang#96812 (Do not lint on explicit outlives requirements from external macros.) - rust-lang#96823 (Properly fix rust-lang#96638) - rust-lang#96872 (make sure ScalarPair enums have ScalarPair variants; add some layout sanity checks) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
PR introducing this ICE: #92364
cc @jackh726
Line producing this ICE:
rust/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs
Lines 430 to 432 in b6c87c5
My attempt at an explanation: #92364 (comment)
First discovered by Clippy's integration tests: https://github.com/rust-lang/rust-clippy/runs/6212887812?check_suite_focus=true#step:7:22
Can also be reproduced by running
cargo +nightly-2022-05-01 check --all-targets --all-features
onchalk
.Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: