rust/compiler
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
..
rustc Change SIGPIPE ui from #[unix_sigpipe = "..."] to -Zon-broken-pipe=... 2024-05-02 19:48:29 +02:00
rustc_abi Temporarily revert to NonZeroUsize in rustc-abi to fix building on stable 2024-05-18 11:27:29 +03:00
rustc_arena
rustc_ast Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
rustc_ast_ir Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
rustc_ast_lowering Cache whether a body has inline consts 2024-05-28 13:38:43 +00:00
rustc_ast_passes Rollup merge of #124048 - veera-sivarajan:bugfix-123773-c23-variadics, r=compiler-errors 2024-05-26 15:28:26 -07:00
rustc_ast_pretty Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
rustc_attr Rename buffer_lint_with_diagnostic to buffer_lint 2024-05-21 20:16:39 +00:00
rustc_baked_icu_data
rustc_borrowck Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
rustc_builtin_macros Rollup merge of #125316 - nnethercote:tweak-Spacing, r=petrochenkov 2024-05-23 07:41:18 +02:00
rustc_codegen_cranelift Omit non-needs_drop drop_in_place in vtables 2024-05-27 16:26:56 -04:00
rustc_codegen_gcc Rollup merge of #125345 - durin42:thin-link-bitcode, r=bjorn3 2024-05-23 23:39:26 +02:00
rustc_codegen_llvm Auto merge of #125463 - GuillaumeGomez:rollup-287wx4y, r=GuillaumeGomez 2024-05-24 03:04:06 +00:00
rustc_codegen_ssa Omit non-needs_drop drop_in_place in vtables 2024-05-27 16:26:56 -04:00
rustc_const_eval Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
rustc_data_structures Rollup merge of #124818 - compiler-errors:ena, r=Mark-Simulacrum 2024-05-11 08:00:15 +02:00
rustc_driver
rustc_driver_impl Exit the process a short time after entering our ctrl-c handler 2024-05-24 17:43:02 -04:00
rustc_error_codes Remove a stray backtick in an error explanation. 2024-05-13 07:53:38 +10:00
rustc_error_messages Auto merge of #125410 - fmease:adj-lint-diag-api, r=nnethercote 2024-05-27 08:44:12 +00:00
rustc_errors Auto merge of #125410 - fmease:adj-lint-diag-api, r=nnethercote 2024-05-27 08:44:12 +00:00
rustc_expand Rollup merge of #125530 - SparrowLii:expand2, r=petrochenkov 2024-05-27 13:10:35 +02:00
rustc_feature Auto merge of #125326 - weiznich:move/do_not_recommend_to_diganostic_namespace, r=compiler-errors 2024-05-22 04:14:08 +00:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Cache whether a body has inline consts 2024-05-28 13:38:43 +00:00
rustc_hir_analysis Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
rustc_hir_pretty Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
rustc_hir_typeck Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
rustc_incremental Run rustfmt on files that need it. 2024-05-24 15:17:21 +10:00
rustc_index
rustc_index_macros
rustc_infer Rollup merge of #125640 - fmease:plz-no-stringify, r=estebank 2024-05-28 02:07:48 -07:00
rustc_interface remove proof tree formatter, make em shallow 2024-05-24 18:41:31 +00:00
rustc_lexer
rustc_lint non_local_defs: point the parent item when appropriate 2024-05-27 23:59:18 +02:00
rustc_lint_defs Rollup merge of #125522 - spastorino:fix-lint-docs-edition-handling, r=Urgau,michaelwoerister 2024-05-27 13:10:34 +02:00
rustc_llvm thinlto: only build summary file if needed 2024-05-23 14:58:30 -04:00
rustc_log Use Backtrace::force_capture instead of Backtrace::capture in rustc_log 2024-05-21 10:54:36 +02:00
rustc_macros Auto merge of #125410 - fmease:adj-lint-diag-api, r=nnethercote 2024-05-27 08:44:12 +00:00
rustc_metadata Give EarlyBinder a tcx parameter 2024-05-26 20:04:05 -04:00
rustc_middle Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
rustc_mir_build Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
rustc_mir_dataflow Remove #[macro_use] extern crate tracing from rustc_mir_dataflow. 2024-05-23 18:02:40 +10:00
rustc_mir_transform Cache whether a body has inline consts 2024-05-28 13:38:43 +00:00
rustc_monomorphize Don't eagerly monomorphize drop for types that are impossible to instantiate 2024-05-24 21:53:39 -04:00
rustc_next_trait_solver Uplift binder 2024-05-21 17:00:45 -04:00
rustc_parse Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
rustc_parse_format
rustc_passes Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
rustc_pattern_analysis Remove LintDiagnostic::msg 2024-05-23 04:08:35 +02:00
rustc_privacy split out AliasTy -> AliasTerm 2024-05-13 11:59:42 -04:00
rustc_query_impl Remove extern crate rustc_middle from rustc_query_impl. 2024-05-13 08:20:18 +10:00
rustc_query_system Add a footer in FileEncoder and check for it in MemDecoder 2024-05-21 20:12:29 -04:00
rustc_resolve Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
rustc_sanitizers Fix typos (taking into account review comments) 2024-05-18 18:12:18 +02:00
rustc_serialize PR feedback 2024-05-21 20:12:30 -04:00
rustc_session remove proof tree formatter, make em shallow 2024-05-24 18:41:31 +00:00
rustc_smir Rollup merge of #125597 - compiler-errors:early-binder, r=jackh726 2024-05-27 13:10:36 +02:00
rustc_span Remove #[macro_use] extern crate tracing from rustc_span`. 2024-05-22 16:03:48 +10:00
rustc_symbol_mangling Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00
rustc_target Stop using the avx512er and avx512pf x86 target features 2024-05-24 20:12:42 +02:00
rustc_trait_selection Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
rustc_traits split out AliasTy -> AliasTerm 2024-05-13 11:59:42 -04:00
rustc_transmute Align: add bytes_usize and bits_usize 2024-05-01 15:57:33 +02:00
rustc_ty_utils Rollup merge of #125597 - compiler-errors:early-binder, r=jackh726 2024-05-27 13:10:36 +02:00
rustc_type_ir Use EarlyBinder in rustc_type_ir, simplify imports 2024-05-26 20:53:00 -04:00
rustc_type_ir_macros Uplift TraitPredicate 2024-05-11 18:20:00 -04:00
stable_mir Remove DefId from EarlyParamRegion (clippy/smir) 2024-05-24 18:06:57 +01:00