rust/tests/ui/manual_map_option_2.fixed
Jason Newcomb 4838c78ba4
Improve manual_map and map_entry
Locals which can be partially moved created within the to-be-created closure shouldn't block the use of a closure
2021-08-14 19:49:45 -04:00

11 lines
175 B
Rust

// run-rustfix
#![warn(clippy::manual_map)]
fn main() {
let _ = Some(0).map(|x| {
let y = (String::new(), String::new());
(x, y.0)
});
}