rust/tests/ui/extern
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
..
auxiliary [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern_fat_drop.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-C-non-FFI-safe-arg-ice-52334.rs add issue numbers via // issue: rust-lang/rust#ISSUE_NUM directive 2024-03-24 09:34:11 +01:00
extern-C-non-FFI-safe-arg-ice-52334.stderr add issue numbers via // issue: rust-lang/rust#ISSUE_NUM directive 2024-03-24 09:34:11 +01:00
extern-C-str-arg-ice-80125.rs add issue numbers via // issue: rust-lang/rust#ISSUE_NUM directive 2024-03-24 09:34:11 +01:00
extern-C-str-arg-ice-80125.stderr add test for str as extern "C" arg causes compiler panic #80125 2024-03-24 09:23:12 +01:00
extern-calling-convention-test.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-compare-with-return-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-const.fixed Use the rustc_private libc less in tests 2024-04-15 08:54:11 -04:00
extern-const.rs Use the rustc_private libc less in tests 2024-04-15 08:54:11 -04:00
extern-const.stderr Use the rustc_private libc less in tests 2024-04-15 08:54:11 -04:00
extern-crate-multiple-missing.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-crate-multiple-missing.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-crate-rename.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-crate-rename.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-crate-visibility.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-crate-visibility.stderr Tweak privacy errors to account for reachable items 2023-06-22 16:50:31 +00:00
extern-ffi-fn-with-body.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-ffi-fn-with-body.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-foreign-crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-macro.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-macro.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-main-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-main-fn.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-main-issue-86110.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-main-issue-86110.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-methods.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-mod-abi.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-mod-ordering-exe.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-no-mangle.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-no-mangle.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-prelude-core.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-prelude-no-speculative.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-prelude-std.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-pub.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-rust.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-static-size-overflow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-static-size-overflow.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-take-value.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-thiscall.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-type-diag-not-similar.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-type-diag-not-similar.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-types-distinct-types.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-types-distinct-types.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-types-field-offset.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-field-offset.run.stderr test that both size_of_val and align_of_val panic 2023-12-12 17:19:19 +01:00
extern-types-inherent-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-manual-sync-send.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-not-sync-send.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-types-not-sync-send.stderr Revert "Suggest using Arc on !Send/!Sync types" 2023-08-28 03:16:48 -07:00
extern-types-pointer-cast.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-size_of_val.align.run.stderr test that both size_of_val and align_of_val panic 2023-12-12 17:19:19 +01:00
extern-types-size_of_val.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-size_of_val.size.run.stderr test that both size_of_val and align_of_val panic 2023-12-12 17:19:19 +01:00
extern-types-thin-pointer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-trait-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-unsized.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-types-unsized.stderr review comment: change wording 2024-02-01 03:31:03 +00:00
extern-vectorcall.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-with-type-bounds.rs Gate and validate #[rustc_safe_intrinsic] 2023-09-25 22:33:15 +02:00
extern-with-type-bounds.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-wrong-value-type.rs Pretty print Fn traits in rustc_on_unimplemented 2023-11-02 20:57:05 +00:00
extern-wrong-value-type.stderr Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
issue-1251.rs Remove libc from rust_get_test_int uses 2024-04-17 09:18:14 -04:00
issue-10025.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-10763.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-10764-rpass.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-13655.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-16250.rs Move some tests 2024-02-09 15:43:08 -03:00
issue-16250.stderr Move some tests 2024-02-09 15:43:08 -03:00
issue-18576.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-18819.rs Move tests 2024-02-13 18:08:25 -03:00
issue-18819.stderr Move tests 2024-02-13 18:08:25 -03:00
issue-28324.rs Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-28324.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-36122-accessing-externed-dst.rs Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
issue-36122-accessing-externed-dst.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
issue-47725.rs Move some tests 2024-02-09 15:43:08 -03:00
issue-47725.stderr Move some tests 2024-02-09 15:43:08 -03:00
issue-64655-allow-unwind-when-calling-panic-directly.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64655-extern-rust-must-allow-unwind.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80074.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80074.stderr exclude unexported macro bindings from extern crate 2024-01-21 20:24:40 +08:00
issue-95829.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-95829.stderr Fix diagnostic for qualifier in extern block 2024-04-04 11:58:38 +02:00
issue-112363-extern-item-where-clauses-debug-ice.rs Fix debug ICE for extern type with where clauses 2023-06-12 15:15:45 +08:00
issue-112363-extern-item-where-clauses-debug-ice.stderr Bless tests 2024-01-13 12:46:58 -05:00
issue-116203.rs discard invalid spans in external blocks 2023-11-15 15:28:38 +08:00
issue-116203.stderr discard invalid spans in external blocks 2023-11-15 15:28:38 +08:00
no-mangle-associated-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-mangle-associated-fn.stderr Update tests 2024-02-07 10:42:01 +08:00
not-in-block.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
not-in-block.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00