1 error: manual implementation of `Option::map`
2 --> $DIR/manual_map_option_2.rs:8:13
4 LL | let _ = match Some(0) {
6 LL | | Some(x) => Some({
7 LL | | let y = (String::new(), String::new());
14 = note: `-D clippy::manual-map` implied by `-D warnings`
17 LL ~ let _ = Some(0).map(|x| {
18 LL + let y = (String::new(), String::new());
23 error: manual implementation of `Option::map`
24 --> $DIR/manual_map_option_2.rs:50:13
26 LL | let _ = match &s {
28 LL | | Some(x) => Some({
29 LL | | if let Some(ref s) = s { (x.clone(), s) } else { panic!() }
37 LL ~ let _ = s.as_ref().map(|x| {
38 LL + if let Some(ref s) = s { (x.clone(), s) } else { panic!() }
42 error: manual implementation of `Option::map`
43 --> $DIR/manual_map_option_2.rs:62:17
45 LL | let _ = match Some(0) {
47 LL | | Some(x) => Some(f(x)),
50 | |_________^ help: try this: `Some(0).map(|x| f(x))`
52 error: manual implementation of `Option::map`
53 --> $DIR/manual_map_option_2.rs:67:13
55 LL | let _ = match Some(0) {
57 LL | | Some(x) => unsafe { Some(f(x)) },
60 | |_____^ help: try this: `Some(0).map(|x| unsafe { f(x) })`
62 error: manual implementation of `Option::map`
63 --> $DIR/manual_map_option_2.rs:71:13
65 LL | let _ = match Some(0) {
67 LL | | Some(x) => Some(unsafe { f(x) }),
70 | |_____^ help: try this: `Some(0).map(|x| unsafe { f(x) })`
72 error: aborting due to 5 previous errors