Closed
Description
Lint name: clippy::unused_unit
I tried this code:
use futures::{future::ok, select}
pub async fn func() {
let mut a = ok::<i32, i32>(1)
select! {
_ = a => (),
}
}
I expected to see this happen: no linting about the unit being unneeded
Instead, this happened: lint says unit expression is unneeded, but macro won't accept removing it
This looks related to #4076, except select!
depends on a proc macro internally
Meta
cargo clippy -V
: clippy 0.1.52 (07e0e2e 2021-03-24)rustc -Vv
:
rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
binary: rustc
commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
commit-date: 2021-03-24
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0
(reproducible on latest stable too)