]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/assertions_on_constants.rs
Add test for not linting on assert!(cfg!(..)).
[rust.git] / tests / ui / assertions_on_constants.rs
index e989de654045632a1a496859c9cff7640742492a..6617ca183a8cb2cbd37c0fa60c3b4fe1a1eb23cc 100644 (file)
@@ -28,4 +28,7 @@ fn main() {
     debug_assert!(false); // #3948
     assert_const!(3);
     assert_const!(-1);
+
+    // Don't lint on this:
+    assert!(cfg!(feature = "hey") || cfg!(not(feature = "asdf")));
 }