-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages
Description
Currently, the lint doesn't flag code like this:
#![warn(clippy::manual_strip)]
fn some_check() -> bool { todo!() }
fn foo(s: &str) {
if s.starts_with("ab")
&& let stripped = &s["ab".len()..]
&& some_check() // to avoid `irrefutable_let_patterns`
{
//
}
}
It would be cool if it would.
I think checking only consecutive if
s is fine.
@rustbot label C-enhancement
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages