2021-02-17 04:26:38 -06:00
warning: irrefutable `if let` pattern
2021-08-08 09:49:13 -05:00
--> $DIR/if-let.rs:6:16
2018-08-08 07:28:26 -05:00
|
2019-01-11 21:10:59 -06:00
LL | if let $p = $e $b
2021-08-08 09:49:13 -05:00
| ^^^
2019-01-11 21:10:59 -06:00
...
2019-03-09 06:03:44 -06:00
LL | / foo!(a, 1, {
2019-01-11 21:10:59 -06:00
LL | | println!("irrefutable pattern");
LL | | });
2021-10-14 13:28:28 -05:00
| |______- in this macro invocation
2018-08-08 07:28:26 -05:00
|
2020-12-05 15:12:39 -06:00
= note: this pattern will always match, so the `if let` is useless
= help: consider replacing the `if let` with a `let`
2022-09-18 10:55:36 -05:00
= note: `#[warn(irrefutable_let_patterns)]` on by default
2021-02-13 13:52:25 -06:00
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 07:28:26 -05:00
2021-02-17 04:26:38 -06:00
warning: irrefutable `if let` pattern
2021-08-08 09:49:13 -05:00
--> $DIR/if-let.rs:6:16
2018-08-08 07:28:26 -05:00
|
2019-01-11 21:10:59 -06:00
LL | if let $p = $e $b
2021-08-08 09:49:13 -05:00
| ^^^
2019-01-11 21:10:59 -06:00
...
2019-03-09 06:03:44 -06:00
LL | / bar!(a, 1, {
2019-01-11 21:10:59 -06:00
LL | | println!("irrefutable pattern");
LL | | });
2021-10-14 13:28:28 -05:00
| |______- in this macro invocation
2019-12-16 07:56:47 -06:00
|
2020-12-05 15:12:39 -06:00
= note: this pattern will always match, so the `if let` is useless
= help: consider replacing the `if let` with a `let`
2022-06-20 21:25:52 -05:00
= note: this warning originates in the macro `foo` which comes from the expansion of the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 07:28:26 -05:00
2021-02-17 04:26:38 -06:00
warning: irrefutable `if let` pattern
2021-08-08 09:49:13 -05:00
--> $DIR/if-let.rs:26:8
2018-08-08 07:28:26 -05:00
|
2021-08-08 09:49:13 -05:00
LL | if let a = 1 {
| ^^^^^^^^^
2020-12-05 15:12:39 -06:00
|
= note: this pattern will always match, so the `if let` is useless
= help: consider replacing the `if let` with a `let`
2018-08-08 07:28:26 -05:00
2021-02-17 04:26:38 -06:00
warning: irrefutable `if let` pattern
2021-08-08 09:49:13 -05:00
--> $DIR/if-let.rs:30:8
2018-08-08 07:28:26 -05:00
|
2021-08-08 09:49:13 -05:00
LL | if let a = 1 {
| ^^^^^^^^^
2020-12-05 15:12:39 -06:00
|
= note: this pattern will always match, so the `if let` is useless
= help: consider replacing the `if let` with a `let`
2018-08-08 07:28:26 -05:00
2021-02-17 04:26:38 -06:00
warning: irrefutable `if let` pattern
2021-08-08 09:49:13 -05:00
--> $DIR/if-let.rs:40:15
2018-08-08 07:28:26 -05:00
|
2021-08-08 09:49:13 -05:00
LL | } else if let a = 1 {
| ^^^^^^^^^
2020-12-05 15:12:39 -06:00
|
= note: this pattern will always match, so the `if let` is useless
= help: consider replacing the `if let` with a `let`
2018-08-08 07:28:26 -05:00
2021-02-17 04:26:38 -06:00
warning: irrefutable `if let` pattern
2021-08-08 09:49:13 -05:00
--> $DIR/if-let.rs:46:15
2019-01-11 21:10:59 -06:00
|
2021-08-08 09:49:13 -05:00
LL | } else if let a = 1 {
| ^^^^^^^^^
2020-12-05 15:12:39 -06:00
|
= note: this pattern will always match, so the `if let` is useless
= help: consider replacing the `if let` with a `let`
2018-08-08 07:28:26 -05:00
2020-03-11 10:30:09 -05:00
warning: 6 warnings emitted