]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/manual_unwrap_or.stderr
Auto merge of #8374 - Alexendoo:bless-revisions, r=camsteffen
[rust.git] / tests / ui / manual_unwrap_or.stderr
index fc174c4c2705dc3c6d7ea4b6df6b889b7b881c8c..0e4cb798d455eaeb7e2be23442d57ee1cf10b646 100644 (file)
@@ -41,11 +41,11 @@ LL | |     };
    |
 help: replace with
    |
-LL |     Some(1).unwrap_or({
-LL |         42 + 42
-LL |             + 42 + 42 + 42
-LL |             + 42 + 42 + 42
-LL |     });
+LL ~     Some(1).unwrap_or({
+LL +         42 + 42
+LL +             + 42 + 42 + 42
+LL +             + 42 + 42 + 42
+LL ~     });
    |
 
 error: this pattern reimplements `Option::unwrap_or`
@@ -125,11 +125,11 @@ LL | |     };
    |
 help: replace with
    |
-LL |     Ok::<i32, &str>(1).unwrap_or({
-LL |         42 + 42
-LL |             + 42 + 42 + 42
-LL |             + 42 + 42 + 42
-LL |     });
+LL ~     Ok::<i32, &str>(1).unwrap_or({
+LL +         42 + 42
+LL +             + 42 + 42 + 42
+LL +             + 42 + 42 + 42
+LL ~     });
    |
 
 error: this pattern reimplements `Result::unwrap_or`
@@ -141,5 +141,15 @@ LL | |         Err(_) => "Alice",
 LL | |     };
    | |_____^ help: replace with: `Ok::<&str, &str>("Bob").unwrap_or("Alice")`
 
-error: aborting due to 13 previous errors
+error: this pattern reimplements `Option::unwrap_or`
+  --> $DIR/manual_unwrap_or.rs:201:17
+   |
+LL |           let _ = match some_macro!() {
+   |  _________________^
+LL | |             Some(val) => val,
+LL | |             None => 0,
+LL | |         };
+   | |_________^ help: replace with: `some_macro!().unwrap_or(0)`
+
+error: aborting due to 14 previous errors