summaryrefslogtreecommitdiffstats
path: root/src/test/ui/expr-block-fn.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/expr-block-fn.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/expr-block-fn.rs b/src/test/ui/expr-block-fn.rs
new file mode 100644
index 000000000..1cac2cac0
--- /dev/null
+++ b/src/test/ui/expr-block-fn.rs
@@ -0,0 +1,9 @@
+// run-pass
+
+fn test_fn() {
+ fn ten() -> isize { return 10; }
+ let rs = ten;
+ assert_eq!(rs(), 10);
+}
+
+pub fn main() { test_fn(); }