summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mir/mir_coercion_casts.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/mir/mir_coercion_casts.rs')
-rw-r--r--src/test/ui/mir/mir_coercion_casts.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/mir/mir_coercion_casts.rs b/src/test/ui/mir/mir_coercion_casts.rs
new file mode 100644
index 000000000..7d761181d
--- /dev/null
+++ b/src/test/ui/mir/mir_coercion_casts.rs
@@ -0,0 +1,10 @@
+// run-pass
+// Tests the coercion casts are handled properly
+
+fn main() {
+ // This should produce only a reification of f,
+ // not a fn -> fn cast as well
+ let _ = f as fn(&());
+}
+
+fn f<'a>(_: &'a ()) { }