summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/closure_promotion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/closures/closure_promotion.rs')
-rw-r--r--tests/ui/closures/closure_promotion.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/closures/closure_promotion.rs b/tests/ui/closures/closure_promotion.rs
new file mode 100644
index 000000000..47a8fc090
--- /dev/null
+++ b/tests/ui/closures/closure_promotion.rs
@@ -0,0 +1,5 @@
+// build-pass (FIXME(62277): could be check-pass?)
+
+fn main() {
+ let x: &'static _ = &|| { let z = 3; z };
+}