summaryrefslogtreecommitdiffstats
path: root/tests/ui/fn/fn-compare-mismatch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/fn/fn-compare-mismatch.rs')
-rw-r--r--tests/ui/fn/fn-compare-mismatch.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/fn/fn-compare-mismatch.rs b/tests/ui/fn/fn-compare-mismatch.rs
new file mode 100644
index 000000000..d734d54e8
--- /dev/null
+++ b/tests/ui/fn/fn-compare-mismatch.rs
@@ -0,0 +1,7 @@
+fn main() {
+ fn f() { }
+ fn g() { }
+ let x = f == g;
+ //~^ ERROR binary operation `==` cannot be applied
+ //~| ERROR mismatched types
+}