rust/tests
bors 87e1447aad Auto merge of #117805 - estebank:arg-fn-mismatch, r=petrochenkov
On Fn arg mismatch for a fn path, suggest a closure

When encountering a fn call that has a path to another fn being passed in, where an `Fn` impl is expected, and the arguments differ, suggest wrapping the argument with a closure with the appropriate arguments.

The last `help` is new:

```
error[E0631]: type mismatch in function arguments
  --> $DIR/E0631.rs:9:9
   |
LL |     fn f(_: u64) {}
   |     ------------ found signature defined here
...
LL |     foo(f);
   |     --- ^ expected due to this
   |     |
   |     required by a bound introduced by this call
   |
   = note: expected function signature `fn(usize) -> _`
              found function signature `fn(u64) -> _`
note: required by a bound in `foo`
  --> $DIR/E0631.rs:3:11
   |
LL | fn foo<F: Fn(usize)>(_: F) {}
   |           ^^^^^^^^^ required by this bound in `foo`
help: consider wrapping the function in a closure
   |
LL |     foo(|arg0: usize| f(/* u64 */));
   |         +++++++++++++  +++++++++++
```
2023-11-30 20:12:53 +00:00
..
assembly Auto merge of #118036 - DianQK:thinlto-tests, r=tmiasko 2023-11-30 13:33:32 +00:00
auxiliary
codegen Auto merge of #118036 - DianQK:thinlto-tests, r=tmiasko 2023-11-30 13:33:32 +00:00
codegen-units Automatically enable cross-crate inlining for small functions 2023-10-17 19:53:51 -04:00
coverage Auto merge of #118036 - DianQK:thinlto-tests, r=tmiasko 2023-11-30 13:33:32 +00:00
coverage-run-rustdoc coverage: Rename the run-coverage test mode to coverage-run 2023-11-08 16:41:24 +11:00
debuginfo Check alignment of pointers only when read/written through 2023-11-04 13:01:32 -04:00
incremental Remove asmjs from tests 2023-10-28 23:11:03 -07:00
mir-opt Rollup merge of #118426 - aDotInTheVoid:const-wat, r=compiler-errors,cjgillot 2023-11-29 12:34:50 +01:00
pretty Remove unnecessary CVarArgs name skipping logic 2023-10-25 17:44:17 +02:00
run-make Enable link-arg link kind inside of #[link] attribute 2023-11-30 08:26:13 -08:00
run-make-fulldeps Merge Queries::{ongoing_codegen,linker}. 2023-11-22 13:22:49 +11:00
run-pass-valgrind
rustdoc rustdoc: remove small from small-section-header 2023-11-29 13:40:07 -07:00
rustdoc-gui rustdoc: remove small from small-section-header 2023-11-29 13:40:07 -07:00
rustdoc-js rustdoc-search: avoid infinite where clause unbox 2023-11-24 10:42:11 -07:00
rustdoc-js-std rustdoc-search: replace TAB/NL/LF with SP first 2023-11-29 11:02:56 -07:00
rustdoc-json rustdoc-json: Fix test so it actuall checks things 2023-11-09 12:13:16 +00:00
rustdoc-ui Manual find replace updates 2023-11-24 21:04:51 +01:00
ui Auto merge of #117805 - estebank:arg-fn-mismatch, r=petrochenkov 2023-11-30 20:12:53 +00:00
ui-fulldeps Use rustc_fluent_macro::fluent_messages! directly. 2023-11-26 08:38:40 +11:00
COMPILER_TESTS.md