rust/tests/ui/async-await/async-fn
Esteban Küber e6bd6c2044 Use parenthetical notation for Fn traits
Always use the `Fn(T) -> R` format when printing closure traits instead of `Fn<(T,), Output = R>`.

Fix #67100:

```
error[E0277]: expected a `Fn()` closure, found `F`
 --> file.rs:6:13
  |
6 |     call_fn(f)
  |     ------- ^ expected an `Fn()` closure, found `F`
  |     |
  |     required by a bound introduced by this call
  |
  = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `call_fn`
 --> file.rs:1:15
  |
1 | fn call_fn<F: Fn() -> ()>(f: &F) {
  |               ^^^^^^^^^^ required by this bound in `call_fn`
help: consider further restricting this bound
  |
5 | fn call_any<F: std::any::Any + Fn()>(f: &F) {
  |                              ++++++
```
2024-05-29 22:26:54 +00:00
..
auxiliary Fix stray trait mismatch in resolve_associated_item for AsyncFn 2024-02-20 15:45:05 +00:00
dyn-pos.rs Only split by-ref/by-move futures for async closures 2024-03-19 16:59:23 -04:00
dyn-pos.stderr Only split by-ref/by-move futures for async closures 2024-03-19 16:59:23 -04:00
edition-2015-not-async-bound.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
edition-2015.rs Better error message in ed 2015 2024-01-31 16:59:19 +00:00
edition-2015.stderr Better error message in ed 2015 2024-01-31 16:59:19 +00:00
higher-ranked-async-fn.rs Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
impl-header.rs Support async trait bounds in macros 2024-02-20 16:09:09 +00:00
impl-header.stderr Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
impl-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
mbe-async-trait-bound-theoretical-regression.rs Support async trait bounds in macros 2024-02-20 16:09:09 +00:00
mbe-async-trait-bound-theoretical-regression.stderr Support async trait bounds in macros 2024-02-20 16:09:09 +00:00
method-call-pos.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-call-pos.stderr Add tests 2024-01-31 16:59:19 +00:00
not-a-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
not-a-trait.stderr Error on incorrect item kind in async bound 2024-01-31 16:59:19 +00:00
project.rs Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
simple.rs Fix stray trait mismatch in resolve_associated_item for AsyncFn 2024-02-20 15:45:05 +00:00
sugar.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
trait-bounds-in-macro.rs Support async trait bounds in macros 2024-02-20 16:09:09 +00:00
trait-bounds-in-macro.stderr Support async trait bounds in macros 2024-02-20 16:09:09 +00:00
wrong-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
wrong-trait.stderr Error on incorrect item kind in async bound 2024-01-31 16:59:19 +00:00