about summary refs log tree commit diff
path: root/tests/ui/function-pointer/signature-mismatch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/function-pointer/signature-mismatch.rs')
-rw-r--r--tests/ui/function-pointer/signature-mismatch.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/function-pointer/signature-mismatch.rs b/tests/ui/function-pointer/signature-mismatch.rs
new file mode 100644
index 00000000000..f269e9bf84b
--- /dev/null
+++ b/tests/ui/function-pointer/signature-mismatch.rs
@@ -0,0 +1,6 @@
+//! This test used to hit an assertion instead of erroring and bailing out.
+
+fn main() {
+    let _ = [std::ops::Add::add, std::ops::Mul::mul, std::ops::Mul::mul as fn(_, &_)];
+    //~^ ERROR: mismatched types
+}