Skip to content

Commit 38ab1a6

Browse files
committed
Add test for not linting on assert!(cfg!(..)).
1 parent 2563910 commit 38ab1a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/ui/assertions_on_constants.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ fn main() {
2828
debug_assert!(false); // #3948
2929
assert_const!(3);
3030
assert_const!(-1);
31+
32+
// Don't lint on this:
33+
assert!(cfg!(feature = "hey") || cfg!(not(feature = "asdf")));
3134
}

0 commit comments

Comments
 (0)