1 error[E0515]: cannot return value referencing function parameter `y`
2 --> $DIR/issue-81584.rs:5:22
4 LL | .map(|y| y.iter().map(|x| x + 1))
5 | --------^^^^^^^^^^^^^^^
7 | returns a value referencing data owned by the current function
10 = help: use `.collect()` to allocate the iterator
12 error: aborting due to previous error
14 For more information about this error, try `rustc --explain E0515`.