Suggest call fn ctor passed as arg to fn with type param bounds
_Reviewer note: the relevant changes are in the second commit, the first is simple and mechanical, but verbose._
When forgetting to call a fn in an argument position to an fn that has a generic bound:
```rust
async fn foo() {}
fn bar(f: impl Future<Output=()>) {}
fn main() {
bar(foo); // <- should be `bar(foo());`
}
```
suggest calling it:
```
error[E0277]: the trait bound `fn() -> impl std::future::Future {foo}: std::future::Future` is not satisfied
--> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:9:5
|
LL | fn bar(f: impl Future<Output=()>) {}
| --------------------------------- required by `bar`
...
LL | bar(foo);
| ^^^ the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}`
|
= help: it looks like you forgot to use parentheses to call the function: `foo()`
```
Fix #63100. Follow up to #63833 and #63337.
|
||
|---|---|---|
| .. | ||
| assembly | ||
| auxiliary | ||
| codegen | ||
| codegen-units | ||
| compile-fail | ||
| debuginfo | ||
| incremental | ||
| mir-opt | ||
| pretty | ||
| run-fail | ||
| run-make | ||
| run-make-fulldeps | ||
| run-pass-valgrind | ||
| rustdoc | ||
| rustdoc-js | ||
| rustdoc-js-std | ||
| rustdoc-ui | ||
| rustfix | ||
| ui | ||
| ui-fulldeps | ||
| COMPILER_TESTS.md | ||