1
Fork 0
rust/compiler
Dylan DPC dee9aed07d
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
2022-06-29 10:28:19 +05:30
..
rustc Rollup merge of #97385 - oli-obk:smir-tool-lib, r=pnkfelix 2022-06-14 07:47:24 +09:00
rustc_apfloat Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rustc_arena
rustc_ast Rollup merge of #98394 - Enselic:fixup-rustc_main-renames, r=petrochenkov 2022-06-24 16:43:47 +09:00
rustc_ast_lowering Use CreateParameter mode for closures too. 2022-06-21 21:13:43 +02:00
rustc_ast_passes Auto merge of #97842 - notriddle:notriddle/tuple-docs, r=jsha,GuillaumeGomez 2022-06-16 11:13:30 +00:00
rustc_ast_pretty Fix pretty printing of empty type bound lists in where-clause 2022-06-16 17:24:50 -07:00
rustc_attr Remove rustc_deprecated diagnostics 2022-06-14 19:46:13 -04:00
rustc_borrowck Rollup merge of #98420 - davidtwco:translation-lint-fixes-and-more-migration, r=compiler-errors 2022-06-28 15:30:04 +05:30
rustc_builtin_macros Auto merge of #98376 - nnethercote:improve-derive-PartialEq, r=petrochenkov 2022-06-29 00:20:57 +00:00
rustc_codegen_cranelift Auto merge of #98098 - bjorn3:archive_refactor, r=michaelwoerister 2022-06-21 16:24:56 +00:00
rustc_codegen_gcc Auto merge of #98098 - bjorn3:archive_refactor, r=michaelwoerister 2022-06-21 16:24:56 +00:00
rustc_codegen_llvm Rollup merge of #98385 - m-ou-se:llvm-12-memory-order, r=petrochenkov 2022-06-26 13:14:57 +09:00
rustc_codegen_ssa Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko 2022-06-29 10:28:18 +05:30
rustc_const_eval make AllocKind actually public 2022-06-27 10:58:30 -04:00
rustc_data_structures Rollup merge of #98384 - rdzhaafar:fix-macos-rss-reporting, r=davidtwco,michaelwoerister 2022-06-28 15:30:03 +05:30
rustc_driver Fix rustdoc argument error 2022-06-27 10:43:51 +02:00
rustc_error_codes Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko 2022-06-29 10:28:18 +05:30
rustc_error_messages privacy: port "in public interface" diag 2022-06-27 08:53:42 +01:00
rustc_errors remove MAX_SUGGESTION_HIGHLIGHT_LINES 2022-06-20 00:25:51 +04:00
rustc_expand Auto merge of #98188 - mystor:fast_group_punct, r=eddyb 2022-06-28 16:10:30 +00:00
rustc_feature Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
rustc_fs_util
rustc_graphviz Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rustc_hir Auto merge of #98222 - cjgillot:single-wf, r=michaelwoerister 2022-06-28 03:44:33 +00:00
rustc_hir_pretty Use CreateParameter mode for closures too. 2022-06-21 21:13:43 +02:00
rustc_incremental Auto merge of #98153 - nnethercote:fix-MissingDoc-quadratic-behaviour, r=cjgillot 2022-06-18 09:57:00 +00:00
rustc_index Auto merge of #95576 - DrMeepster:box_erasure, r=oli-obk 2022-06-21 11:00:39 +00:00
rustc_infer Rollup merge of #97346 - JohnTitor:remove-back-compat-hacks, r=oli-obk 2022-06-28 15:30:00 +05:30
rustc_interface Rollup merge of #98165 - WaffleLapkin:once_things_renamings, r=m-ou-se 2022-06-19 00:17:13 +02:00
rustc_lexer fix typo in comment 2022-06-28 19:59:09 +05:30
rustc_lint Rollup merge of #98420 - davidtwco:translation-lint-fixes-and-more-migration, r=compiler-errors 2022-06-28 15:30:04 +05:30
rustc_lint_defs make const_err show up in future breakage reports 2022-06-25 10:30:47 -04:00
rustc_llvm llvm-wrapper: adapt for an LLVM API change 2022-06-28 14:08:35 +00:00
rustc_log clippy::complexity fixes 2022-05-26 13:14:24 +02:00
rustc_macros macros: use typed identifiers in subdiag derive 2022-06-24 09:08:25 +01:00
rustc_metadata Fix panic by checking if CStore has the crate data we want before actually querying it 2022-06-20 23:39:26 +02:00
rustc_middle Auto merge of #98222 - cjgillot:single-wf, r=michaelwoerister 2022-06-28 03:44:33 +00:00
rustc_mir_build Rollup merge of #98429 - b-naber:use-correct-substs-discriminant-cast, r=lcnr 2022-06-25 15:14:13 +02:00
rustc_mir_dataflow Auto merge of #95576 - DrMeepster:box_erasure, r=oli-obk 2022-06-21 11:00:39 +00:00
rustc_mir_transform Auto merge of #95576 - DrMeepster:box_erasure, r=oli-obk 2022-06-21 11:00:39 +00:00
rustc_monomorphize Rollup merge of #98067 - klensy:compiler-deps2, r=Dylan-DPC 2022-06-15 12:02:02 +09:00
rustc_parse various: add rustc_lint_diagnostics to diag fns 2022-06-27 08:32:06 +01:00
rustc_parse_format
rustc_passes Rollup merge of #98394 - Enselic:fixup-rustc_main-renames, r=petrochenkov 2022-06-24 16:43:47 +09:00
rustc_plugin_impl remove currently unused deps 2022-06-13 22:20:51 +03:00
rustc_privacy privacy: deny diagnostic migration lints 2022-06-27 08:53:42 +01:00
rustc_query_impl Auto merge of #98106 - cjgillot:split-definitions, r=michaelwoerister 2022-06-17 10:00:11 +00:00
rustc_query_system Remove likely! and unlikely! macro from compiler 2022-06-18 04:52:11 +01:00
rustc_resolve Rollup merge of #98419 - WaffleLapkin:remove_excess_rib, r=compiler-errors 2022-06-24 16:43:49 +09:00
rustc_save_analysis Make ExprKind::Closure a struct variant. 2022-06-12 00:16:27 +02:00
rustc_serialize Move finish out of the Encoder trait. 2022-06-16 16:20:32 +10:00
rustc_session various: add rustc_lint_diagnostics to diag fns 2022-06-27 08:32:06 +01:00
rustc_smir Rustfmt 2022-06-02 10:29:00 +00:00
rustc_span Auto merge of #98376 - nnethercote:improve-derive-PartialEq, r=petrochenkov 2022-06-29 00:20:57 +00:00
rustc_symbol_mangling Rollup merge of #98067 - klensy:compiler-deps2, r=Dylan-DPC 2022-06-15 12:02:02 +09:00
rustc_target rustc_target: Some more tests and fixes for linker arguments 2022-06-25 21:57:08 +03:00
rustc_trait_selection Rollup merge of #97346 - JohnTitor:remove-back-compat-hacks, r=oli-obk 2022-06-28 15:30:00 +05:30
rustc_traits implement valtrees as the type-system representation for constant values 2022-06-14 16:07:11 +02:00
rustc_ty_utils implement valtrees as the type-system representation for constant values 2022-06-14 16:07:11 +02:00
rustc_type_ir Rewrite TyKind::fmt. 2022-06-24 09:40:21 +10:00
rustc_typeck Rollup merge of #97542 - compiler-errors:arg-mismatch, r=jackh726 2022-06-29 10:28:19 +05:30