rust/compiler/rustc_borrowck/src
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
..
constraints Use RPITIT for Successors and Predecessors traits 2024-04-15 13:34:08 +00:00
diagnostics Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
polonius Auto merge of #125284 - compiler-errors:uplift-misc, r=lcnr 2024-05-21 02:51:38 +00:00
region_infer Uplift RegionVid 2024-05-20 13:57:58 -04:00
type_check Uplift OutlivesPredicate, remove a bunch of unnecessary associated types from Interner 2024-05-21 17:00:45 -04:00
util Move some utils out of rustc_const_eval 2023-04-16 12:05:54 +02:00
borrow_set.rs Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-dead 2024-04-30 15:04:08 +02:00
borrowck_errors.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
consumers.rs BorrowckInferCtxt: infcx by value 2024-05-06 15:20:13 +00:00
dataflow.rs Make depth_first_search into a standalone function 2024-04-14 16:03:08 +00:00
def_use.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
facts.rs Uplift RegionVid 2024-05-20 13:57:58 -04:00
lib.rs Remove Rvalue::CheckedBinaryOp 2024-05-17 20:33:02 -07:00
location.rs Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
member_constraints.rs Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
nll.rs BorrowckInferCtxt: infcx by value 2024-05-06 15:20:13 +00:00
path_utils.rs remove a bunch of dead parameters in fn 2024-02-12 09:51:35 +08:00
place_ext.rs Move trait into attr so it's greppable 2024-02-16 15:07:37 +00:00
places_conflict.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
prefixes.rs cleanup prefixes iterator 2024-03-13 12:34:58 -07:00
renumber.rs Correct a comment. 2024-05-09 20:15:42 +10:00
session_diagnostics.rs Prevent opaque types being instantiated twice with different regions within the same function 2024-03-18 10:26:10 +00:00
universal_regions.rs BorrowckInferCtxt: infcx by value 2024-05-06 15:20:13 +00:00
used_muts.rs Bump indexmap 2024-02-13 21:03:34 +00:00