about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-28 19:18:56 +0000
committerbors <bors@rust-lang.org>2024-09-28 19:18:56 +0000
commit897f0e4749ce1d2d2d2857c31417432f8b53d455 (patch)
tree7930b4ed11ef64f4f3d31d131c3f1b9fe264151b /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentb367d3422c713113258d4f652e7295a59e5fddde (diff)
parentd24a63199a5ad140fd52f6feb2e279e2a51cc201 (diff)
downloadrust-897f0e4749ce1d2d2d2857c31417432f8b53d455.tar.gz
rust-897f0e4749ce1d2d2d2857c31417432f8b53d455.zip
Auto merge of #13471 - y21:issue13466-fp, r=llogiq
Remove method call receiver special casing in `unused_async` lint

Fixes the false positive mentioned in https://github.com/rust-lang/rust-clippy/issues/13466#issuecomment-2380025514.

The false negative in the OP would be nice to fix too, but I'd rather do that in a separate PR because it's much more involved

Before this change, the `unused_async` lint would check if the async fn is also used anywhere and avoid linting if so. The exception is if the async function is immediately called, because the returned future handling can be easily removed (and also if we don't have some exceptions then the lint wouldn't trigger anywhere) *or* if it's a method call receiver.

I'm not exactly sure why I implemented that special casing for method call receivers in #11200, but it doesn't make much sense in hindsight imo. Especially given that method calls are essentially equivalent to function calls with the receiver as the first argument, which was the primary motivation for not linting in the first place (async fn passed to another function, like `axum::get(handler)` where handler has to be an async fn).

changelog: none
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions