rust/src/test/ui/issues/issue-81584.fixed
2021-02-24 07:07:53 +00:00

9 lines
280 B
Rust

// run-rustfix
fn main() {
let _ = vec![vec![0, 1], vec![2]]
.into_iter()
.map(|y| y.iter().map(|x| x + 1).collect::<Vec<_>>())
//~^ ERROR cannot return value referencing function parameter `y`
.collect::<Vec<_>>();
}