rust/tests/ui/fn
bors 1d52972dd8 Auto merge of #125778 - estebank:issue-67100, r=compiler-errors
Use parenthetical notation for `Fn` traits

Always use the `Fn(T) -> R` format when printing closure traits instead of `Fn<(T,), Output = R>`.

Address #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-06-03 08:14:03 +00:00
..
bad-main.rs
bad-main.stderr
dyn-fn-alignment.rs
expr-fn-panic.rs
expr-fn.rs
fn_def_coercion.rs
fn_def_coercion.stderr
fn_def_opaque_coercion_to_fn_ptr.rs
fn_def_opaque_coercion_to_fn_ptr.stderr
fn_def_opaque_coercion.rs
fn-bad-block-type.rs
fn-bad-block-type.stderr
fn-closure-mutable-capture.rs
fn-closure-mutable-capture.stderr
fn-compare-mismatch.rs
fn-compare-mismatch.stderr
fn-item-type.rs
fn-item-type.stderr
fn-pointer-mismatch.rs
fn-pointer-mismatch.stderr
fn-ptr-trait-int-float-infer-var.rs
fn-ptr-trait.rs
fn-recover-return-sign2.rs
fn-recover-return-sign2.stderr
fn-recover-return-sign.fixed
fn-recover-return-sign.rs
fn-recover-return-sign.stderr
fn-trait-formatting.rs
fn-trait-formatting.stderr
fun-call-variants.rs
implied-bounds-impl-header-projections.rs
implied-bounds-unnorm-associated-type-2.rs
implied-bounds-unnorm-associated-type-2.stderr
implied-bounds-unnorm-associated-type-3.rs
implied-bounds-unnorm-associated-type-4.rs
implied-bounds-unnorm-associated-type-4.stderr
implied-bounds-unnorm-associated-type-5.rs
implied-bounds-unnorm-associated-type-5.stderr
implied-bounds-unnorm-associated-type.rs
implied-bounds-unnorm-associated-type.stderr
issue-1451.rs
issue-1900.rs
issue-1900.stderr
issue-3044.rs
issue-3044.stderr
issue-3099.rs
issue-3099.stderr
issue-3904.rs
issue-39259.rs Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
issue-39259.stderr Auto merge of #125778 - estebank:issue-67100, r=compiler-errors 2024-06-03 08:14:03 +00:00
issue-80179.rs
issue-80179.stderr
keyword-order.rs
keyword-order.stderr
nested-function-names-issue-8587.rs
signature-error-reporting-under-verbose.rs
signature-error-reporting-under-verbose.stderr
suggest-return-closure.rs
suggest-return-closure.stderr
suggest-return-future.rs
suggest-return-future.stderr