rust/compiler/rustc_hir_analysis/src
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
..
check Auto merge of #124662 - zetanumbers:needs_async_drop, r=oli-obk 2024-05-31 10:12:24 +00:00
coherence Auto merge of #125778 - estebank:issue-67100, r=compiler-errors 2024-06-03 08:14:03 +00:00
collect Rollup merge of #125635 - fmease:mv-type-binding-assoc-item-constraint, r=compiler-errors 2024-05-31 08:50:22 +02:00
errors Explicitly mention Self 2024-04-20 11:39:43 -04:00
hir_ty_lowering Rollup merge of #125635 - fmease:mv-type-binding-assoc-item-constraint, r=compiler-errors 2024-05-31 08:50:22 +02:00
impl_wf_check Apply nits 2024-05-13 16:55:58 -04:00
outlives Give EarlyBinder a tcx parameter 2024-05-26 20:04:05 -04:00
structured_errors Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
variance Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes 2024-05-19 11:10:56 -03:00
autoderef.rs Make builtin_deref just return a Ty 2024-05-09 22:55:00 -04:00
bounds.rs Rename ToPredicate for Upcast 2024-05-16 14:23:47 -04:00
check_unused.rs Remove LintDiagnostic::msg 2024-05-23 04:08:35 +02:00
collect.rs Add lang item for Future::Output 2024-05-29 14:22:56 -04:00
constrained_generic_params.rs Auto merge of #125076 - compiler-errors:alias-term, r=lcnr 2024-05-13 22:20:43 +00:00
errors.rs Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
hir_wf_check.rs Remove extern crate rustc_middle from rustc_hir_analysis. 2024-05-13 08:04:47 +10:00
impl_wf_check.rs Rename Generics::params to Generics::own_params 2024-05-09 20:58:46 -04:00
lib.rs Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
structured_errors.rs Rename StructuredDiagnostic as StructuredDiag. 2024-03-05 12:15:12 +11:00