about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-06-29 10:28:19 +0530
committerGitHub <noreply@github.com>2022-06-29 10:28:19 +0530
commitdee9aed07d3e4d54d1d4c56474a9630e4cd3496f (patch)
treed77cf95af955c9c46e46372ca70050f88b528b3e /compiler/rustc_codegen_llvm/src
parent45740acd3451a574f4b67329f70e610145cd99cd (diff)
parentf2277e03eeb112730e3f07fab0d6b91d195fe55c (diff)
downloadrust-dee9aed07d3e4d54d1d4c56474a9630e4cd3496f.tar.gz
rust-dee9aed07d3e4d54d1d4c56474a9630e4cd3496f.zip
Rollup merge of #97542 - compiler-errors:arg-mismatch, r=jackh726
Use typed indices in argument mismatch algorithm

I kinda went overboard with the renames, but in general, "arg" is renamed to "expected", and "input" is renamed to "provided", and we use new typed indices to make sure we're indexing into the right sized array.

Other drive-by changes:
1. Factor this logic into a new function, so we don't need to `break 'label` to escape it.
1. Factored out dependence on `final_arg_types`, which is never populated for arguments greater than the number of expected args. Instead, we just grab the final coerced expression type from `in_progress_typeck_results`.
1. Adjust the criteria we use to print (provided) type names, before we didn't suggest anything that had infer vars, but now we suggest thing that have infer vars but aren't `_`.

~Also, sorry in advance, I kinda want to backport this but I know I have folded in a lot of unnecessary drive-by changes that might discourage that. I would be open to brainstorming how to get some of these changes on beta at least.~ edit: Minimized the ICE-fixing changes to #97557

cc `@jackh726` as author of #92364, and `@estebank` as reviewer of the PR.
fixes #97484
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions