summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/eq-less-to-less-eq.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/eq-less-to-less-eq.rs')
-rw-r--r--tests/ui/parser/eq-less-to-less-eq.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/ui/parser/eq-less-to-less-eq.rs b/tests/ui/parser/eq-less-to-less-eq.rs
new file mode 100644
index 000000000..23c6c59d7
--- /dev/null
+++ b/tests/ui/parser/eq-less-to-less-eq.rs
@@ -0,0 +1,33 @@
+fn foo() {
+ let a = 0;
+ let b = 4;
+ if a =< b { //~ERROR
+ println!("yay!");
+ }
+}
+
+fn bar() {
+ let a = 0;
+ let b = 4;
+ if a = <b { //~ERROR
+ println!("yay!");
+ }
+}
+
+fn baz() {
+ let a = 0;
+ let b = 4;
+ if a = < b { //~ERROR
+ println!("yay!");
+ }
+}
+
+fn qux() {
+ let a = 0;
+ let b = 4;
+ if a =< i32>::abs(-4) { //~ERROR: mismatched types
+ println!("yay!");
+ }
+}
+
+fn main() {}