]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/parser/chained-comparison-suggestion.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / parser / chained-comparison-suggestion.rs
index 0431196f1744e064b78ff66937a00b14bb3f1d3b..bbd46082c9f901bcc6c22f8de14f1759029bb188 100644 (file)
@@ -37,4 +37,17 @@ fn comp8() {
     //~^ ERROR mismatched types
 }
 
+fn comp9() {
+    1 == 2 < 3; //~ ERROR comparison operators cannot be chained
+}
+
+fn comp10() {
+    1 > 2 == false; //~ ERROR comparison operators cannot be chained
+}
+
+fn comp11() {
+    1 == 2 == 3; //~ ERROR comparison operators cannot be chained
+    //~^ ERROR mismatched types
+}
+
 fn main() {}