about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-10-19 14:05:51 +0530
committerGitHub <noreply@github.com>2022-10-19 14:05:51 +0530
commit5c2c476ad17b7cf4c883dedd3802b5b8a9d1b8f3 (patch)
treee63a8e812c2a9a49fb89db99646259df67edd152 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent84365fff0a99fbf6deab383bd9a8152202b6779b (diff)
parent35f157073238b9e0e97d9e9d17b4861103d87962 (diff)
downloadrust-5c2c476ad17b7cf4c883dedd3802b5b8a9d1b8f3.tar.gz
rust-5c2c476ad17b7cf4c883dedd3802b5b8a9d1b8f3.zip
Rollup merge of #102863 - compiler-errors:call-suggestion-on-unimplemented, r=nagisa
Standardize "use parentheses to call" suggestions between typeck and trait selection

1. Suggest calling constructors, since they're basically `FnDef`s but they have a different def kind and hir representation, so we were leaving them out.
2. Standardize the call suggestions between trait fulfillment errors and type mismatch. In the type mismatch suggestion, we suggest `/* Ty */` as the placeholder for an arg, and not the parameter's name, which is less helpful.
3. Use `predicate_must_hold_modulo_regions` instead of matching on `EvaluationResult` -- this might cause some suggestions to be filtered out, but we really shouldn't be suggesting a call if it "may" hold, only when it "must" hold.
4. Borrow some logic from `extract_callable_info` to generalize this suggestion to fn pointers, type parameters, and opaque types.

Fixes #102852
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions