rust/compiler/rustc_hir_analysis/src/coherence
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
..
builtin.rs Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
inherent_impls_overlap.rs Fix non_local_definitions lint in rustc_hir_analysis 2024-02-17 13:59:46 +01:00
inherent_impls.rs Remove extern crate rustc_middle from rustc_hir_analysis. 2024-05-13 08:04:47 +10:00
mod.rs Deduplicate supertrait_def_ids code 2024-06-01 07:50:32 -04:00
orphan.rs Remove extern crate rustc_middle from rustc_hir_analysis. 2024-05-13 08:04:47 +10:00
unsafety.rs Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00