summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs b/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs
new file mode 100644
index 000000000..8deb36551
--- /dev/null
+++ b/src/test/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
+}