Skip to content

Commit 8473716

Browse files
Add ui regression test for rust-lang#12371
1 parent ebf2095 commit 8473716

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/ui/nonminimal_bool.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,8 @@ fn issue_5794() {
173173
if !b == !c {} //~ ERROR: this boolean expression can be simplified
174174
if !b != !c {} //~ ERROR: this boolean expression can be simplified
175175
}
176+
177+
fn issue_12371(x: usize) -> bool {
178+
// Should not warn!
179+
!x != 0
180+
}

0 commit comments

Comments
 (0)