Summary
When using rustc 1.83.0-nightly clippy wrongly report needless_return. After changed to the stable version it became normal.
Reproducer
I tried this code:
use xxx::run;
use eyre::Result;
#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt::init();
run().await;
}
I expected to see this happen: Do not report needless_return because I even haven't used the return keywords.
Instead, this happened: It reported needless_return and suggested me to change run().await; to run().run().await;. There is definately something wrong here.
(Cannot provide the whole code and output because is a private project)
Version
rustc 1.83.0-nightly (7608018 2024-09-29)
binary: rustc
commit-hash: 7608018...
commit-date: 2024-09-29
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0
Additional Labels
No response
Summary
When using
rustc 1.83.0-nightlyclippy wrongly reportneedless_return. After changed to the stable version it became normal.Reproducer
I tried this code:
I expected to see this happen: Do not report
needless_returnbecause I even haven't used thereturnkeywords.Instead, this happened: It reported
needless_returnand suggested me to changerun().await;torun().run().await;. There is definately something wrong here.(Cannot provide the whole code and output because is a private project)
Version
rustc 1.83.0-nightly (7608018 2024-09-29)
binary: rustc
commit-hash: 7608018...
commit-date: 2024-09-29
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0
Additional Labels
No response