@@ -67,7 +67,16 @@ LL | | };
6767 | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(42)`
6868
6969error: this pattern reimplements `Result::unwrap_or`
70- --> $DIR/manual_unwrap_or.rs:92:5
70+ --> $DIR/manual_unwrap_or.rs:93:5
71+ |
72+ LL | / match a {
73+ LL | | Ok(i) => i,
74+ LL | | Err(_) => 42,
75+ LL | | };
76+ | |_____^ help: replace with: `a.unwrap_or(42)`
77+
78+ error: this pattern reimplements `Result::unwrap_or`
79+ --> $DIR/manual_unwrap_or.rs:99:5
7180 |
7281LL | / match Ok(1) as Result<i32, &str> {
7382LL | | Ok(i) => i,
@@ -76,7 +85,7 @@ LL | | };
7685 | |_____^ help: replace with: `(Ok(1) as Result<i32, &str>).unwrap_or(42)`
7786
7887error: this pattern reimplements `Result::unwrap_or`
79- --> $DIR/manual_unwrap_or.rs:98 :5
88+ --> $DIR/manual_unwrap_or.rs:105 :5
8089 |
8190LL | / match Ok::<i32, &str>(1) {
8291LL | | Err(_) => 42,
@@ -85,7 +94,7 @@ LL | | };
8594 | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(42)`
8695
8796error: this pattern reimplements `Result::unwrap_or`
88- --> $DIR/manual_unwrap_or.rs:104 :5
97+ --> $DIR/manual_unwrap_or.rs:111 :5
8998 |
9099LL | / match Ok::<i32, &str>(1) {
91100LL | | Ok(i) => i,
@@ -94,7 +103,7 @@ LL | | };
94103 | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(1 + 42)`
95104
96105error: this pattern reimplements `Result::unwrap_or`
97- --> $DIR/manual_unwrap_or.rs:111 :5
106+ --> $DIR/manual_unwrap_or.rs:118 :5
98107 |
99108LL | / match Ok::<i32, &str>(1) {
100109LL | | Ok(i) => i,
@@ -115,13 +124,13 @@ LL | });
115124 |
116125
117126error: this pattern reimplements `Result::unwrap_or`
118- --> $DIR/manual_unwrap_or.rs:121 :5
127+ --> $DIR/manual_unwrap_or.rs:128 :5
119128 |
120129LL | / match Ok::<&str, &str>("Bob") {
121130LL | | Ok(i) => i,
122131LL | | Err(_) => "Alice",
123132LL | | };
124133 | |_____^ help: replace with: `Ok::<&str, &str>("Bob").unwrap_or("Alice")`
125134
126- error: aborting due to 11 previous errors
135+ error: aborting due to 12 previous errors
127136
0 commit comments