rust/tests/ui/async-await
bors 1d52972dd8 Auto merge of #125778 - estebank:issue-67100, r=compiler-errors
Use parenthetical notation for `Fn` traits

Always use the `Fn(T) -> R` format when printing closure traits instead of `Fn<(T,), Output = R>`.

Address #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-06-03 08:14:03 +00:00
..
async-closures Auto merge of #125423 - fmease:rollup-ne4l9y4, r=fmease 2024-05-22 21:51:26 +00:00
async-fn Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
auxiliary
await-keyword Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
drop-order
future-sizes In pretty_print_type(), print async fn futures' paths instead of spans. 2024-03-25 08:01:15 -07:00
in-trait
issues Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
multiple-lifetimes
return-type-notation Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
track-caller Use suggest_impl_trait in return type suggestion 2024-04-10 18:58:15 -04:00
argument-patterns.rs
async-assoc-fn-anon-lifetimes.rs
async-await-let-else.rs
async-await-let-else.stderr
async-await.rs
async-block-control-flow-static-semantics.rs Update Tests 2024-05-07 16:56:54 -04:00
async-block-control-flow-static-semantics.stderr Update Tests 2024-05-07 16:56:54 -04:00
async-borrowck-escaping-block-error.fixed
async-borrowck-escaping-block-error.rs
async-borrowck-escaping-block-error.stderr
async-borrowck-escaping-closure-error.rs Make the computation of coroutine_captures_by_ref_ty more sophisticated 2024-04-10 13:39:53 -04:00
async-borrowck-escaping-closure-error.stderr Make the computation of coroutine_captures_by_ref_ty more sophisticated 2024-04-10 13:39:53 -04:00
async-closure-matches-expr.rs
async-closure.rs
async-drop.rs Revert miri async drop test but add warnings to each async drop test 2024-05-29 12:57:01 +03:00
async-drop.run.stdout Add simple async drop glue generation 2024-04-16 20:45:07 +03:00
async-error-span.rs
async-error-span.stderr
async-fn-elided-impl-lifetime-parameter.rs
async-fn-nonsend.rs
async-fn-nonsend.stderr
async-fn-path-elision.rs
async-fn-path-elision.stderr
async-fn-send-uses-nonsend.rs
async-fn-size-moved-locals.rs
async-fn-size-uninit-locals.rs
async-fn-size.rs
async-is-unwindsafe.rs Wrap Context.ext in AssertUnwindSafe 2024-05-21 19:05:37 -07:00
async-is-unwindsafe.stderr Wrap Context.ext in AssertUnwindSafe 2024-05-21 19:05:37 -07:00
async-matches-expr.rs
async-outside-of-await-issue-121096.rs
async-outside-of-await-issue-121096.stderr Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
async-trait-fn.rs
async-unsafe-fn-call-in-safe.rs
async-unsafe-fn-call-in-safe.stderr
async-with-closure.rs
await-into-future.rs
await-sequence.rs
await-unsize.rs
awaiting-unsized-param.rs
awaiting-unsized-param.stderr
bound-normalization.rs
clone-suggestion.fixed
clone-suggestion.rs
clone-suggestion.stderr
conditional-and-guaranteed-initialization.rs
const-async-fn-in-main.rs
const-async-fn-in-main.stderr
context-is-sorta-unwindsafe.rs Wrap Context.ext in AssertUnwindSafe 2024-05-21 19:05:37 -07:00
coroutine-desc.rs
coroutine-desc.stderr
coroutine-not-future.rs Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
coroutine-not-future.stderr Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
debug-ice-attempted-to-add-with-overflow.rs
debug-ice-attempted-to-add-with-overflow.stderr
deep-futures-are-freeze.rs
default-struct-update.rs
dont-ice-for-type-mismatch-in-closure-in-async.rs Stop using HirId for fn-like parents 2024-04-11 11:56:47 -04:00
dont-ice-for-type-mismatch-in-closure-in-async.stderr Inline get_node_fn_decl into get_fn_decl, simplify/explain logic in report_return_mismatched_types 2024-05-20 20:16:29 -04:00
dont-print-desugared-async.rs
dont-print-desugared-async.stderr
dont-suggest-await-on-method-return-mismatch.rs
dont-suggest-await-on-method-return-mismatch.stderr
dont-suggest-missing-await.rs
dont-suggest-missing-await.stderr
drop-and-assign.rs
drop-track-bad-field-in-fru.rs
drop-track-bad-field-in-fru.stderr
drop-track-field-assign-nonsend.rs
drop-track-field-assign-nonsend.stderr
drop-track-field-assign.rs
drop-tracking-unresolved-typeck-results.rs
drop-tracking-unresolved-typeck-results.stderr
edition-deny-async-fns-2015.rs
edition-deny-async-fns-2015.stderr
expansion-in-attrs.rs
feature-async-closure.rs
feature-async-closure.stderr
feature-async-for-loop.rs
feature-async-for-loop.stderr
feature-self-return-type.rs
feature-self-return-type.stderr
field-assign-nonsend.rs
field-assign-nonsend.stderr
field-assign.rs
for-await-2015.rs
for-await-consumes-iter.rs
for-await-consumes-iter.stderr
for-await-passthrough.rs
for-await.rs
future-contains-err-issue-115188.rs
future-contains-err-issue-115188.stderr
futures-api.rs
generics-and-bounds.rs
incorrect-move-async-order-issue-79694.fixed
incorrect-move-async-order-issue-79694.rs
incorrect-move-async-order-issue-79694.stderr
inference_var_self_argument.rs Replace item names containing an error code with something more meaningful 2024-04-30 22:27:19 +02:00
inference_var_self_argument.stderr Replace item names containing an error code with something more meaningful 2024-04-30 22:27:19 +02:00
interior-with-const-generic-expr.rs
issue-54239-private-type-triggers-lint.rs
issue-60709.rs
issue-61076.rs
issue-61076.stderr
issue-61452.rs
issue-61452.stderr
issue-61793.rs
issue-62658.rs
issue-63832-await-short-temporary-lifetime-1.rs
issue-63832-await-short-temporary-lifetime.rs
issue-64130-1-sync.rs
issue-64130-1-sync.stderr
issue-64130-2-send.rs
issue-64130-2-send.stderr
issue-64130-3-other.rs
issue-64130-3-other.stderr
issue-64130-4-async-move.rs
issue-64130-non-send-future-diags.rs
issue-64130-non-send-future-diags.stderr
issue-64391.rs
issue-65634-raw-ident-suggestion.edition2015.stderr
issue-65634-raw-ident-suggestion.edition2018.stderr
issue-65634-raw-ident-suggestion.rs
issue-66312.rs
issue-66312.stderr Replace item names containing an error code with something more meaningful 2024-04-30 22:27:19 +02:00
issue-66387-if-without-else.rs
issue-66387-if-without-else.stderr
issue-67252-unnamed-future.rs
issue-67252-unnamed-future.stderr
issue-67651.rs
issue-67651.stderr
issue-67765-async-diagnostic.rs
issue-67765-async-diagnostic.stderr
issue-68112.rs
issue-68112.stderr
issue-68523-start.rs
issue-68523-start.stderr
issue-68523.rs
issue-68523.stderr
issue-69446-fnmut-capture.rs
issue-69446-fnmut-capture.stderr
issue-70594.rs
issue-70594.stderr
issue-70818.rs
issue-70818.stderr
issue-70935-complex-spans.rs
issue-70935-complex-spans.stderr
issue-71137.rs
issue-71137.stderr
issue-72442.rs
issue-72442.stderr
issue-72470-llvm-dominate.rs
issue-72590-type-error-sized.rs
issue-72590-type-error-sized.stderr
issue-73050.rs
issue-73137.rs
issue-73541-1.rs
issue-73541-1.stderr
issue-73541-2.rs
issue-73541-2.stderr
issue-73541-3.rs
issue-73541-3.stderr
issue-73541.rs
issue-73541.stderr
issue-73741-type-err.rs
issue-73741-type-err.stderr
issue-74047.rs
issue-74047.stderr
issue-74072-lifetime-name-annotations.rs
issue-74072-lifetime-name-annotations.stderr
issue-74497-lifetime-in-opaque.rs
issue-74497-lifetime-in-opaque.stderr
issue-75785-confusing-named-region.rs
issue-75785-confusing-named-region.stderr
issue-76547.rs
issue-76547.stderr
issue-77993-2.rs
issue-77993-2.stderr
issue-78115.rs
issue-84841.rs
issue-84841.stderr
issue-86507.rs
issue-86507.stderr
issue-93197.rs
issue-93648.rs
issue-98634.rs
issue-98634.stderr
issue-101715.rs
issue-101715.stderr
issue-105501.rs
issue-107036.rs
issue-108572.fixed
issue-108572.rs
issue-108572.stderr
missed-capture-issue-107414.rs
missing-return-in-async-block.fixed
missing-return-in-async-block.rs
missing-return-in-async-block.stderr
move-part-await-return-rest-struct.rs
move-part-await-return-rest-tuple.rs
mutually-recursive-async-impl-trait-type.rs
mutually-recursive-async-impl-trait-type.stderr
nested-in-impl.rs
no-async-const.rs
no-async-const.stderr
no-const-async.rs
no-const-async.stderr
no-move-across-await-struct.rs
no-move-across-await-struct.stderr
no-move-across-await-tuple.rs
no-move-across-await-tuple.stderr
no-non-guaranteed-initialization.rs
no-non-guaranteed-initialization.stderr
no-params-non-move-async-closure.rs
no-std.rs
no-unsafe-async.rs
no-unsafe-async.stderr
non-trivial-drop.rs Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
normalize-output-in-signature-deduction.rs
partial-drop-partial-reinit.rs
partial-drop-partial-reinit.stderr
partial-initialization-across-await.rs
partial-initialization-across-await.stderr
pin-needed-to-poll-2.rs
pin-needed-to-poll-2.stderr
pin-needed-to-poll.rs
pin-needed-to-poll.stderr
proper-span-for-type-error.fixed
proper-span-for-type-error.rs
proper-span-for-type-error.stderr
recursive-async-impl-trait-type.rs
recursive-async-impl-trait-type.stderr
repeat_count_const_in_async_fn.rs
return-ty-raw-ptr-coercion.rs
return-ty-unsize-coercion.rs
send-bound-async-closure.rs
suggest-missing-await-closure.fixed
suggest-missing-await-closure.rs
suggest-missing-await-closure.stderr
suggest-missing-await.rs
suggest-missing-await.stderr
suggest-switching-edition-on-await-cargo.rs
suggest-switching-edition-on-await-cargo.stderr
suggest-switching-edition-on-await.rs
suggest-switching-edition-on-await.stderr
task-context-arg.rs
try-on-option-in-async.rs
try-on-option-in-async.stderr
type-parameter-send.rs
unnecessary-await.rs
unnecessary-await.stderr
unreachable-lint-1.rs
unreachable-lint-1.stderr
unreachable-lint.rs
unresolved_type_param.rs
unresolved_type_param.stderr
unsized-across-await.rs
unsized-across-await.stderr
unused-lifetime.rs
unused-lifetime.stderr