Skip to content

Conversation

@emberian
Copy link
Contributor

Rebase + fix of #10118

@emberian
Copy link
Contributor Author

mis-rebase

@emberian emberian closed this Nov 16, 2013
@emberian emberian reopened this Nov 16, 2013
bors added a commit that referenced this pull request Nov 17, 2013
@bors bors closed this Nov 17, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 6, 2023
…r=Jarcho

Make redundant_async_block a more complete late pass

This lets us detect more complex situations: `async { x.await }` is simplified into `x` if:

- `x` is an expression without side-effect
- or `x` is an `async` block itself

In both cases, no part of the `async` expression can be part of a macro expansion.

Fixes rust-lang#10509.
Fixes rust-lang#10525.

changelog: [`redundant_async_block`] Do not lint expressions with side effects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants