Skip to content

Suggest calling async closure when needed - #66239

Merged
bors merged 3 commits into
rust-lang:masterfrom
estebank:suggest-async-closure-call
Nov 19, 2019
Merged

Suggest calling async closure when needed#66239
bors merged 3 commits into
rust-lang:masterfrom
estebank:suggest-async-closure-call

Conversation

@estebank

Copy link
Copy Markdown
Contributor

When using an async closure as a value in a place that expects a future,
suggest calling the closure.

Fix#65923.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 9, 2019
@estebank

Copy link
Copy Markdown
ContributorAuthor

r? @Centril

@rust-highfiverust-highfive assigned Centril and unassigned eddybNov 9, 2019
Comment threadsrc/librustc/traits/error_reporting.rs Outdated
Comment threadsrc/librustc/traits/error_reporting.rs Outdated
Comment threadsrc/librustc/traits/error_reporting.rs Outdated
Comment threadsrc/librustc/traits/error_reporting.rs Outdated
Comment threadsrc/librustc/traits/error_reporting.rs Outdated
@CentrilCentril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 11, 2019
@Centril

Copy link
Copy Markdown
Contributor

@estebank 👋 :)

When using an async closure as a value in a place that expects a future,
suggest calling the closure.
Fixrust-lang#65923.
@estebank
estebankforce-pushed the suggest-async-closure-call branch from 1a0703b to d7efa5bCompareNovember 17, 2019 01:10

@CentrilCentril left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits

Comment threadsrc/librustc/traits/error_reporting.rs Outdated
Comment threadsrc/librustc/traits/error_reporting.rs Outdated

@CentrilCentril left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with nits fixed

Comment threadsrc/librustc/traits/error_reporting.rs Outdated
Comment threadsrc/librustc/traits/error_reporting.rs Outdated
@estebank
estebankforce-pushed the suggest-async-closure-call branch from fa057fd to fcf26aaCompareNovember 18, 2019 17:57
@rust-highfive

This comment has been minimized.

@estebank
estebankforce-pushed the suggest-async-closure-call branch from fcf26aa to 614da98CompareNovember 18, 2019 19:46
@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors r=Centril

@bors

bors commented Nov 18, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 614da98 has been approved by Centril

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 18, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 19, 2019
…, r=Centril
Suggest calling async closure when needed
When using an async closure as a value in a place that expects a future,
suggest calling the closure.
Fixrust-lang#65923.
@JohnTitorJohnTitor mentioned this pull request Nov 19, 2019
bors added a commit that referenced this pull request Nov 19, 2019
Rollup of 13 pull requests
Successful merges:
- #66090 (Misc CI improvements)
- #66239 (Suggest calling async closure when needed)
- #66430 ([doc] Fix the source code highlighting on source comments)
- #66431 (Fix 'type annotations needed' error with opaque types)
- #66461 (Add explanation message for E0641)
- #66468 (Cleanup Miri SIMD intrinsics)
- #66478 (rustc_plugin: Remove the compatibility shim)
- #66493 (Add JohnTitor to rustc-guide toolstate notification list)
- #66511 (std::error::Chain: remove Copy)
- #66512 (Add unix::process::CommandExt::arg0)
- #66520 (Disable gdb pretty printer global section on wasm targets)
- #66529 (resolve: Give derive helpers highest priority during resolution)
- #66536 (Move the definition of `QueryResult` into `plumbing.rs`.)
Failed merges:
r? @ghost
@bors

bors commented Nov 19, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 614da98 with merge 10a0e4c9c274c8cc6476866bbc68f80c664934cb...

Centril added a commit to Centril/rust that referenced this pull request Nov 19, 2019
…, r=Centril
Suggest calling async closure when needed
When using an async closure as a value in a place that expects a future,
suggest calling the closure.
Fixrust-lang#65923.
@CentrilCentril mentioned this pull request Nov 19, 2019
@Centril

Copy link
Copy Markdown
Contributor

@bors retry rolled up.

bors added a commit that referenced this pull request Nov 19, 2019
Rollup of 11 pull requests
Successful merges:
- #66090 (Misc CI improvements)
- #66155 (Add long error explanation for E0594)
- #66239 (Suggest calling async closure when needed)
- #66430 ([doc] Fix the source code highlighting on source comments)
- #66431 (Fix 'type annotations needed' error with opaque types)
- #66461 (Add explanation message for E0641)
- #66493 (Add JohnTitor to rustc-guide toolstate notification list)
- #66511 (std::error::Chain: remove Copy)
- #66529 (resolve: Give derive helpers highest priority during resolution)
- #66536 (Move the definition of `QueryResult` into `plumbing.rs`.)
- #66538 (Remove compiler_builtins_lib feature from libstd)
Failed merges:
r? @ghost
@bors

bors commented Nov 19, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 614da98 with merge 9d6ff15...

@bors
bors merged commit 614da98 into rust-lang:masterNov 19, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unhelpful error message when awaiting an async closure while forgetting the brackets

6 participants

@estebank@rust-highfive@Centril@bors@gilescope@eddyb