mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
8 lines
261 B
Rust
8 lines
261 B
Rust
//@ run-rustfix
|
|
fn main() {
|
|
let _ = vec![vec![0, 1], vec![2]]
|
|
.into_iter()
|
|
.map(|y| y.iter().map(|x| x + 1))
|
|
//~^ ERROR cannot return value referencing function parameter `y`
|
|
.collect::<Vec<_>>();
|
|
}
|