1 error: use `as_ref()` instead
2 --> $DIR/match_as_ref.rs:8:33
4 LL | let borrowed: Option<&()> = match owned {
5 | _________________________________^
7 LL | | Some(ref v) => Some(v),
9 | |_____^ help: try this: `owned.as_ref()`
11 = note: `-D clippy::match-as-ref` implied by `-D warnings`
13 error: use `as_mut()` instead
14 --> $DIR/match_as_ref.rs:14:39
16 LL | let borrow_mut: Option<&mut ()> = match mut_owned {
17 | _______________________________________^
19 LL | | Some(ref mut v) => Some(v),
21 | |_____^ help: try this: `mut_owned.as_mut()`
23 error: use `as_ref()` instead
24 --> $DIR/match_as_ref.rs:30:13
26 LL | / match self.source {
27 LL | | Some(ref s) => Some(s),
30 | |_____________^ help: try this: `self.source.as_ref().map(|x| x as _)`
32 error: aborting due to 3 previous errors