diff options
| author | bors <bors@rust-lang.org> | 2023-04-05 18:31:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-05 18:31:32 +0000 |
| commit | 26e245d2ff38671e6c58395d853cd253adc7343b (patch) | |
| tree | 0e229b01208454aaefc8a71047aa96cf18bebc44 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 5d149c5dac439e332f7c73dc3601f08400abe88e (diff) | |
| parent | 2891d8f72f8e598177c0bf6c1d56ad2e70a1f536 (diff) | |
| download | rust-26e245d2ff38671e6c58395d853cd253adc7343b.tar.gz rust-26e245d2ff38671e6c58395d853cd253adc7343b.zip | |
Auto merge of #10554 - samueltardieu:redundant-async-block, 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 #10509.
Fixes #10525.
changelog: [`redundant_async_block`] Do not lint expressions with side effects.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
