2022-11-21 13:34:47 -06:00
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:27:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let v = if let Some(v_some) = g() { v_some } else { return };
|
2023-05-20 08:39:26 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Some(v) = g() else { return };`
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-let-else` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_let_else)]`
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:30:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return;
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some(v) = g() else {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:37:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | // Blocks around the identity should have no impact
|
2023-11-02 11:12:25 -05:00
|
|
|
LL | | { { v } }
|
2022-11-21 13:34:47 -06:00
|
|
|
... |
|
|
|
|
LL | | return;
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(v) = g() else {
|
|
|
|
LL + // Some computation should still make it fire
|
|
|
|
LL + g();
|
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:49:9
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let v = if let Some(v_some) = g() { v_some } else { continue };
|
2023-05-20 08:39:26 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Some(v) = g() else { continue };`
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:51:9
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let v = if let Some(v_some) = g() { v_some } else { break };
|
2023-05-20 08:39:26 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Some(v) = g() else { break };`
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:56:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let v = if let Some(v_some) = g() { v_some } else { panic!() };
|
2023-05-20 08:39:26 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Some(v) = g() else { panic!() };`
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:60:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
LL | | std::process::abort()
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some(v) = g() else {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + std::process::abort()
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:68:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
LL | | if true { return } else { panic!() }
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some(v) = g() else {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + if true { return } else { panic!() }
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:76:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
LL | | if true {}
|
|
|
|
LL | | panic!();
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some(v) = g() else {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + if true {}
|
|
|
|
LL + panic!();
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-02 11:12:25 -05:00
|
|
|
--> $DIR/manual_let_else.rs:85:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
2023-11-09 16:29:01 -06:00
|
|
|
LL | | panic!();
|
|
|
|
LL | | ()
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(v) = g() else {
|
|
|
|
LL + panic!();
|
|
|
|
LL + ()
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
|
|
|
--> $DIR/manual_let_else.rs:94:5
|
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
|
|
|
LL | |
|
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
2022-11-21 13:34:47 -06:00
|
|
|
... |
|
|
|
|
LL | | }
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some(v) = g() else {
|
2023-11-09 16:29:01 -06:00
|
|
|
LL + panic!();
|
|
|
|
LL + if true {
|
|
|
|
LL + match 0 {
|
|
|
|
LL + 0 => (),
|
|
|
|
LL + _ => (),
|
|
|
|
LL + }
|
|
|
|
LL + } else {
|
|
|
|
LL + panic!()
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + }
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:110:5
|
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
|
|
|
LL | |
|
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
... |
|
|
|
|
LL | | }
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(v) = g() else {
|
|
|
|
LL + loop {
|
|
|
|
LL + panic!();
|
|
|
|
LL + break ();
|
|
|
|
LL + }
|
|
|
|
LL + };
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:121:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
2023-08-24 14:32:12 -05:00
|
|
|
... |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | }
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some(v) = g() else {
|
2023-11-09 16:29:01 -06:00
|
|
|
LL + 'a: loop {
|
|
|
|
LL + panic!();
|
|
|
|
LL + loop {
|
|
|
|
LL + match 0 {
|
|
|
|
LL + 0 if (return break 'a ()) => {},
|
|
|
|
LL + _ => {},
|
|
|
|
LL + }
|
|
|
|
LL + }
|
|
|
|
LL + }
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
|
|
|
--> $DIR/manual_let_else.rs:137:5
|
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
|
|
|
LL | |
|
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
... |
|
|
|
|
LL | | };
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(v) = g() else {
|
|
|
|
LL + match 0 {
|
|
|
|
LL + 0 if true => panic!(),
|
|
|
|
LL + _ => panic!(),
|
|
|
|
LL + };
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
|
|
|
--> $DIR/manual_let_else.rs:148:5
|
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
|
|
|
LL | |
|
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
LL | | if panic!() {};
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(v) = g() else {
|
|
|
|
LL + if panic!() {};
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
|
|
|
--> $DIR/manual_let_else.rs:156:5
|
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
|
|
|
LL | |
|
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
... |
|
|
|
|
LL | | };
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(v) = g() else {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + match panic!() {
|
|
|
|
LL + _ => {},
|
2023-11-09 16:29:01 -06:00
|
|
|
LL + };
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:166:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else if true {
|
2023-08-24 14:32:12 -05:00
|
|
|
... |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | panic!("diverge");
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some(v) = g() else { if true {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + return;
|
|
|
|
LL + } else {
|
|
|
|
LL + panic!("diverge");
|
|
|
|
LL + } };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:176:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
... |
|
|
|
|
LL | | }
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some(v) = g() else {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + match (g(), g()) {
|
|
|
|
LL + (Some(_), None) => return,
|
|
|
|
LL + (None, Some(_)) => {
|
|
|
|
LL + if true {
|
|
|
|
LL + return;
|
|
|
|
LL + } else {
|
|
|
|
LL + panic!();
|
|
|
|
LL + }
|
|
|
|
LL + },
|
|
|
|
LL + _ => return,
|
|
|
|
LL + }
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:194:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | / let (v, w) = if let Some(v_some) = g().map(|v| (v, 42)) {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return;
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
LL ~ let Some((v, w)) = g().map(|v| (v, 42)) else {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:202:5
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
2023-07-02 07:35:19 -05:00
|
|
|
LL | / let (w, S { v }) = if let (Some(v_some), w_some) = (g().map(|_| S { v: 0 }), 0) {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-11-21 13:34:47 -06:00
|
|
|
LL | | (w_some, v_some)
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return;
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
2023-07-02 07:35:19 -05:00
|
|
|
LL ~ let (Some(S { v }), w) = (g().map(|_| S { v: 0 }), 0) else {
|
2022-11-21 13:34:47 -06:00
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:212:13
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let $n = if let Some(v) = $e { v } else { return };
|
2023-05-20 08:39:26 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Some($n) = g() else { return };`
|
2022-11-21 13:34:47 -06:00
|
|
|
...
|
|
|
|
LL | create_binding_if_some!(w, g());
|
|
|
|
| ------------------------------- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `create_binding_if_some` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
2022-12-01 11:29:38 -06:00
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:221:5
|
2023-05-20 08:39:26 -05:00
|
|
|
|
|
|
|
|
LL | let v = if let Variant::A(a, 0) = e() { a } else { return };
|
2023-06-02 04:41:57 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Variant::A(v, 0) = e() else { return };`
|
2023-05-20 08:39:26 -05:00
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:225:5
|
2023-05-20 08:39:26 -05:00
|
|
|
|
|
2023-06-02 04:41:57 -05:00
|
|
|
LL | let mut v = if let Variant::B(b) = e() { b } else { return };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Variant::B(mut v) = e() else { return };`
|
2023-05-20 08:39:26 -05:00
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:230:5
|
2023-06-02 04:41:57 -05:00
|
|
|
|
|
|
|
|
LL | / let v = if let Ok(Some(Variant::B(b))) | Err(Some(Variant::A(b, _))) = nested {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2023-06-02 04:41:57 -05:00
|
|
|
LL | | b
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return;
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let (Ok(Some(Variant::B(v))) | Err(Some(Variant::A(v, _)))) = nested else {
|
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:237:5
|
2023-06-02 04:41:57 -05:00
|
|
|
|
|
|
|
|
LL | let v = if let Variant::A(.., a) = e() { a } else { return };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Variant::A(.., v) = e() else { return };`
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:241:5
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
LL | let w = if let (Some(v), ()) = (g(), ()) { v } else { return };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let (Some(w), ()) = (g(), ()) else { return };`
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:245:5
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
LL | / let w = if let Some(S { v: x }) = Some(S { v: 0 }) {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2023-07-02 07:35:19 -05:00
|
|
|
LL | | x
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return;
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(S { v: w }) = Some(S { v: 0 }) else {
|
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:253:5
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(S { v: x }) = Some(S { v: 0 }) {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2023-07-02 07:35:19 -05:00
|
|
|
LL | | x
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return;
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(S { v }) = Some(S { v: 0 }) else {
|
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:261:5
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
LL | / let (x, S { v }, w) = if let Some(U { v, w, x }) = None::<U<S<()>>> {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2023-07-02 07:35:19 -05:00
|
|
|
LL | | (x, v, w)
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return;
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(U { v: S { v }, w, x }) = None::<U<S<()>>> else {
|
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-11-09 16:29:01 -06:00
|
|
|
--> $DIR/manual_let_else.rs:378:5
|
2022-12-01 11:29:38 -06:00
|
|
|
|
|
|
|
|
LL | / let _ = match ff {
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-12-01 11:29:38 -06:00
|
|
|
LL | | Some(value) => value,
|
|
|
|
LL | | _ => macro_call!(),
|
|
|
|
LL | | };
|
2023-05-20 08:39:26 -05:00
|
|
|
| |______^ help: consider writing: `let Some(_) = ff else { macro_call!() };`
|
2022-12-01 11:29:38 -06:00
|
|
|
|
2023-11-09 16:29:01 -06:00
|
|
|
error: aborting due to 30 previous errors
|
2022-11-21 13:34:47 -06:00
|
|
|
|