about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-03 23:30:08 +0200
committerGitHub <noreply@github.com>2024-07-03 23:30:08 +0200
commit603130948b532b98862ddd504f3db57eb6f06eeb (patch)
tree74476d0040a51e88a4cba0e6b263b691f2eec82c /compiler/rustc_codegen_llvm/src/errors.rs
parent77fa597079d7854dedf45f8a86fcdf05668dc551 (diff)
parent9f32459c988dec799458f304bbc49ed5dc6ef772 (diff)
downloadrust-603130948b532b98862ddd504f3db57eb6f06eeb.tar.gz
rust-603130948b532b98862ddd504f3db57eb6f06eeb.zip
Rollup merge of #127253 - chenyukang:yukang-fix-126246-fn-parameters-check, r=estebank
Fix incorrect suggestion for extra argument with a type error

Fixes #126246

I tried to fix it in the `find_errors` of ArgMatrix, but seems it's hard to avoid breaking some other test cases.

The root cause is we eliminate the first argument even with a type error at here:
https://github.com/rust-lang/rust/blob/6292b2af620dbd771ebb687c3a93c69ba8f97268/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs#L664

So the left argument is always treated as extra one.

But if there is already a type error, an error message will be generated firstly, which make this issue a trivial one.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions