rust/tests/ui/rfcs
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
..
impl-trait
rfc-0000-never_patterns
rfc-0107-bind-by-move-pattern-guards
rfc-1014-stdout-existential-crisis
rfc-1445-restrict-constants-in-patterns
rfc-1623-static
rfc-1717-dllimport
rfc-1789-as-cell
rfc-1857-stabilize-drop-order
rfc-1937-termination-trait
rfc-2005-default-binding-mode
rfc-2008-non-exhaustive
rfc-2027-object-safe-for-dispatch
rfc-2091-track-caller
rfc-2093-infer-outlives
rfc-2126-crate-paths
rfc-2126-extern-absolute-paths
rfc-2151-raw-identifiers
rfc-2175-or-if-while-let
rfc-2294-if-let-guard
rfc-2302-self-struct-ctor
rfc-2306-convert-id
rfc-2361-dbg-macro
rfc-2396-target_feature-11 Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
rfc-2421-unreserve-pure-offsetof-sizeof-alignof
rfc-2457-non-ascii-idents
rfc-2497-if-let-chains
rfc-2528-type-changing-struct-update
rfc-2565-param-attrs
rfc-2627-raw-dylib
rfc-2632-const-trait-impl Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
rfc-3348-c-string-literals
type-alias-impl-trait