-
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-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
This transformation isn't correct:
fn main() {
let s = "Beyoncé";
// EVERY character isn't ascii
dbg!(s.chars().all(|c| !char::is_ascii(&c)));
// ANY character isn't ascii
dbg!(!s.is_ascii());
}
[src/main.rs:3:5] s.chars().all(|c| !char::is_ascii(&c)) = false
[src/main.rs:4:5] !s.is_ascii() = true
Originally posted by @aDotInTheVoid in #12815 (comment)
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have