summaryrefslogtreecommitdiffstats
path: root/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs')
-rw-r--r--tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs b/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs
new file mode 100644
index 000000000..8deb36551
--- /dev/null
+++ b/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs
@@ -0,0 +1,3 @@
+fn main() {
+ [0].iter().flat_map(|a| [0].iter().map(|_| &a)); //~ ERROR closure may outlive
+}