Skip to content

Commit 5b836e3

Browse files
committed
Add test for debug_assert!(false)
1 parent be98df5 commit 5b836e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/ui/assertions_on_constants.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ fn main() {
1818
assert!(C);
1919

2020
debug_assert!(true);
21+
// Don't lint this, since there is no better way for expressing "Only panic in debug mode".
22+
debug_assert!(false); // #3948
2123
assert_const!(3);
2224
assert_const!(-1);
2325
}

0 commit comments

Comments
 (0)