summaryrefslogtreecommitdiffstats
path: root/src/test/ui/fn/fn-compare-mismatch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/fn/fn-compare-mismatch.rs')
-rw-r--r--src/test/ui/fn/fn-compare-mismatch.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/fn/fn-compare-mismatch.rs b/src/test/ui/fn/fn-compare-mismatch.rs
new file mode 100644
index 000000000..d734d54e8
--- /dev/null
+++ b/src/test/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
+}