1 error: manual implementation of `Option::map`
2 --> $DIR/manual_map_option_2.rs:6: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`
15 = help: to override `-D warnings` add `#[allow(clippy::manual_map)]`
18 LL ~ let _ = Some(0).map(|x| {
19 LL + let y = (String::new(), String::new());
24 error: manual implementation of `Option::map`
25 --> $DIR/manual_map_option_2.rs:48:13
27 LL | let _ = match &s {
29 LL | | Some(x) => Some({
30 LL | | if let Some(ref s) = s { (x.clone(), s) } else { panic!() }
38 LL ~ let _ = s.as_ref().map(|x| {
39 LL + if let Some(ref s) = s { (x.clone(), s) } else { panic!() }
43 error: manual implementation of `Option::map`
44 --> $DIR/manual_map_option_2.rs:60:17
46 LL | let _ = match Some(0) {
48 LL | | Some(x) => Some(f(x)),
51 | |_________^ help: try: `Some(0).map(|x| f(x))`
53 error: manual implementation of `Option::map`
54 --> $DIR/manual_map_option_2.rs:65:13
56 LL | let _ = match Some(0) {
58 LL | | Some(x) => unsafe { Some(f(x)) },
61 | |_____^ help: try: `Some(0).map(|x| unsafe { f(x) })`
63 error: manual implementation of `Option::map`
64 --> $DIR/manual_map_option_2.rs:69:13
66 LL | let _ = match Some(0) {
68 LL | | Some(x) => Some(unsafe { f(x) }),
71 | |_____^ help: try: `Some(0).map(|x| unsafe { f(x) })`
73 error: aborting due to 5 previous errors