(RFC) option: rewrite the API to use composition#9359
Merged
bors merged 1 commit intorust-lang:masterfrom Oct 9, 2013
thestinger:option
Merged
(RFC) option: rewrite the API to use composition#9359bors merged 1 commit intorust-lang:masterfrom thestinger:option
bors merged 1 commit intorust-lang:masterfrom
thestinger:option
Conversation
Contributor
|
Let's please make sure we get enough consensus on this before merging. |
Contributor
|
A hearty +1 |
Contributor
|
Once you thunk it, you can't unthink it. A great change. |
Member
|
We discussed this in the meeting today and have concluded that we'd like to include this. The consensus, though, was that the following changes should be made:
We figured that |
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Jul 31, 2023
[`unused_async`]: don't lint if paths reference async fn without immediate call Fixes rust-lang#9695 Fixes rust-lang#9359 Clippy shouldn't lint unused `async` if there are paths referencing them if that path isn't the receiver of a function call, because that means that the function might be passed to some other function: ```rs async fn f() {} // No await statements, so unused at this point fn requires_fn_future<F: Future<Output = ()>>(_: fn() -> F) {} requires_fn_future(f); // `f`'s asyncness is actually not unused. ``` (This isn't limited to just passing the function as a parameter to another function, it could also first be stored in a variable and later passed to another function as an argument) This requires delaying the linting until post-crate and collecting path references to local async functions along the way. changelog: [`unused_async`]: don't lint if paths reference async fn that require asyncness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #9355 for discussion.