]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/match_as_ref.stderr
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / match_as_ref.stderr
index 09115b85d35b8563aea5a07c8760f5d7a30a54c7..dd4739d1ff21d51038408c9e059f15c1347f6096 100644 (file)
@@ -20,5 +20,14 @@ LL | |         Some(ref mut v) => Some(v),
 LL | |     };
    | |_____^ help: try this: `mut_owned.as_mut()`
 
-error: aborting due to 2 previous errors
+error: use as_ref() instead
+  --> $DIR/match_as_ref.rs:30:13
+   |
+LL | /             match self.source {
+LL | |                 Some(ref s) => Some(s),
+LL | |                 None => None,
+LL | |             }
+   | |_____________^ help: try this: `self.source.as_ref().map(|x| x as _)`
+
+error: aborting due to 3 previous errors