-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tIssue: The lint should have been triggered on code, but wasn't
Description
Summary
On nightly, the infinite_loop
lint seems to no longer lint any async functions at all, regardless of their return type. I imagine this is likely an unintended consequence of false positive fix #15157.
Lint Name
infinite_loop
Reproducer
I tried this code:
#![deny(clippy::infinite_loop)]
// should not be linted
async fn good() -> ! {
loop {
std::future::pending().await
}
}
// should be linted
async fn bad() {
loop {
std::future::pending().await
}
}
I expected to see this happen: One deny error from bad()
Instead, this happened: Zero errors
Version
rustc 1.91.0-nightly (46c219bd2 2025-08-22)
binary: rustc
commit-hash: 46c219bd24862c0a87f0299570bb37f2d5ecf6ce
commit-date: 2025-08-22
host: aarch64-apple-darwin
release: 1.91.0-nightly
LLVM version: 21.1.0
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tIssue: The lint should have been triggered on code, but wasn't