2022-02-16 01:10:42 +00:00
|
|
|
error: this could be rewritten as `let else`
|
2022-02-19 06:15:20 +00:00
|
|
|
--> $DIR/manual_let_else_match.rs:32:5
|
2022-02-16 01:10:42 +00:00
|
|
|
|
|
|
|
|
LL | / let v = match g() {
|
|
|
|
LL | | Some(v_some) => v_some,
|
|
|
|
LL | | None => return,
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-let-else` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: this could be rewritten as `let else`
|
2022-02-19 06:15:20 +00:00
|
|
|
--> $DIR/manual_let_else_match.rs:37:5
|
2022-02-16 01:10:42 +00:00
|
|
|
|
|
|
|
|
LL | / let v = match g() {
|
|
|
|
LL | | Some(v_some) => v_some,
|
|
|
|
LL | | _ => return,
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
error: this could be rewritten as `let else`
|
2022-02-19 06:15:20 +00:00
|
|
|
--> $DIR/manual_let_else_match.rs:44:9
|
2022-02-16 01:10:42 +00:00
|
|
|
|
|
|
|
|
LL | / let v = match h() {
|
2022-02-19 06:15:20 +00:00
|
|
|
LL | | (Some(_), Some(_)) | (None, None) => continue,
|
|
|
|
LL | | (Some(v), None) | (None, Some(v)) => v,
|
|
|
|
LL | | };
|
|
|
|
| |__________^
|
|
|
|
|
|
|
|
error: this could be rewritten as `let else`
|
|
|
|
--> $DIR/manual_let_else_match.rs:49:9
|
|
|
|
|
|
|
|
|
LL | / let v = match build_enum() {
|
|
|
|
LL | | _ => continue,
|
2022-02-16 01:10:42 +00:00
|
|
|
LL | | Variant::Bar(v) | Variant::Baz(v) => v,
|
|
|
|
LL | | };
|
|
|
|
| |__________^
|
|
|
|
|
|
|
|
error: this could be rewritten as `let else`
|
2022-02-19 06:15:20 +00:00
|
|
|
--> $DIR/manual_let_else_match.rs:57:5
|
2022-02-16 01:10:42 +00:00
|
|
|
|
|
|
|
|
LL | / let v = match f() {
|
|
|
|
LL | | Ok(v) => v,
|
|
|
|
LL | | Err(_) => return,
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
2022-02-19 06:15:20 +00:00
|
|
|
error: this could be rewritten as `let else`
|
|
|
|
--> $DIR/manual_let_else_match.rs:63:5
|
|
|
|
|
|
|
|
|
LL | / let v = match f().map_err(|_| ()) {
|
|
|
|
LL | | Ok(v) => v,
|
|
|
|
LL | | Err(()) => return,
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
2022-02-16 01:10:42 +00:00
|
|
|
|