]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/bool_comparison.rs
iterate List by value
[rust.git] / tests / ui / bool_comparison.rs
index 74f504edfd0697054580db65500ea8b62e11c2b7..01ee35859f0da64c055a3eb6a9b313b77e597cb7 100644 (file)
@@ -111,3 +111,19 @@ fn partial_cmp(&self, _: &Foo) -> Option<std::cmp::Ordering> {
     if Foo < false {}
     if false < Foo {}
 }
+
+#[allow(dead_code)]
+fn issue4983() {
+    let a = true;
+    let b = false;
+
+    if a == !b {};
+    if !a == b {};
+    if a == b {};
+    if !a == !b {};
+
+    if b == !a {};
+    if !b == a {};
+    if b == a {};
+    if !b == !a {};
+}