rust/tests/ui/unsafe
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
unsafe_op_in_unsafe_fn Cleanup: Fix up some diagnostics 2024-05-22 22:40:34 +02:00
access_union_field.rs
access_union_field.stderr
const_pat_in_layout_restricted.rs
edition-2024-unsafe_op_in_unsafe_fn.rs
edition-2024-unsafe_op_in_unsafe_fn.stderr Cleanup: Fix up some diagnostics 2024-05-22 22:40:34 +02:00
foreign-unsafe-fn-called.rs
foreign-unsafe-fn-called.stderr
initializing-ranged-via-ctor.rs
initializing-ranged-via-ctor.stderr Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
inline_asm.rs
inline_asm.stderr
issue-3080.rs
issue-3080.stderr
issue-45087-unreachable-unsafe.rs
issue-45087-unreachable-unsafe.stderr
issue-45107-unnecessary-unsafe-in-closure.rs
issue-45107-unnecessary-unsafe-in-closure.stderr
issue-47412.rs
issue-47412.stderr
issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs
issue-87414-query-cycle.rs
issue-106126-good-path-bug.rs
issue-115348-false-positive-warning-of-unnecessary-unsafe.rs
issue-115348-false-positive-warning-of-unnecessary-unsafe.stderr
new-unsafe-pointers.rs
ranged-ctor-as-fn-ptr.rs
ranged-ctor-as-fn-ptr.stderr Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00
ranged_ints.rs
ranged_ints.stderr
ranged_ints2.rs
ranged_ints2.stderr
ranged_ints2_const.rs
ranged_ints2_const.stderr
ranged_ints3.rs
ranged_ints3.stderr
ranged_ints3_const.rs
ranged_ints3_const.stderr
ranged_ints3_match.rs
ranged_ints3_match.stderr
ranged_ints4.rs
ranged_ints4.stderr
ranged_ints4_const.rs
ranged_ints4_const.stderr
ranged_ints_const.rs
ranged_ints_const.stderr
ranged_ints_macro.rs
union-assignop.rs
union-assignop.stderr
union-modification.rs
union.rs
union.stderr
union_access_through_block.rs
union_destructure.rs
union_wild_or_wild.rs
unsafe-around-compiler-generated-unsafe.rs
unsafe-around-compiler-generated-unsafe.stderr
unsafe-assign.rs
unsafe-assign.stderr
unsafe-block-without-braces.rs
unsafe-block-without-braces.stderr
unsafe-borrow.rs
unsafe-borrow.stderr
unsafe-const-fn.rs
unsafe-const-fn.stderr
unsafe-fn-assign-deref-ptr.rs
unsafe-fn-assign-deref-ptr.stderr
unsafe-fn-autoderef.rs
unsafe-fn-autoderef.stderr
unsafe-fn-called-from-safe.rs
unsafe-fn-called-from-safe.stderr
unsafe-fn-called-from-unsafe-blk.rs
unsafe-fn-called-from-unsafe-fn.rs
unsafe-fn-deref-ptr.rs
unsafe-fn-deref-ptr.stderr
unsafe-fn-used-as-value.rs
unsafe-fn-used-as-value.stderr
unsafe-not-inherited.rs
unsafe-not-inherited.stderr
unsafe-pointer-assignability.rs
unsafe-subtyping.rs
unsafe-subtyping.stderr Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00
unsafe-trait-impl.rs
unsafe-trait-impl.stderr Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00
unsafe-unstable-const-fn.rs
unsafe-unstable-const-fn.stderr