2019-01-12 03:10:59 +00:00
|
|
|
warning: irrefutable if-let pattern
|
|
|
|
--> $DIR/if-let.rs:6:13
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | if let $p = $e $b
|
2019-12-06 22:33:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2019-01-12 03:10:59 +00:00
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | / foo!(a, 1, {
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | });
|
|
|
|
| |_______- in this macro invocation
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-07-16 20:17:38 +00:00
|
|
|
= note: `#[warn(irrefutable_let_patterns)]` on by default
|
2019-12-16 13:56:47 +00:00
|
|
|
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
warning: irrefutable if-let pattern
|
|
|
|
--> $DIR/if-let.rs:6:13
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | if let $p = $e $b
|
2019-12-06 22:33:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2019-01-12 03:10:59 +00:00
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | / bar!(a, 1, {
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | });
|
|
|
|
| |_______- in this macro invocation
|
2019-12-16 13:56:47 +00:00
|
|
|
|
|
|
|
|
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
warning: irrefutable if-let pattern
|
2019-10-24 00:00:00 +00:00
|
|
|
--> $DIR/if-let.rs:26:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | / if let a = 1 {
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
warning: irrefutable if-let pattern
|
2019-10-24 00:00:00 +00:00
|
|
|
--> $DIR/if-let.rs:30:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | / if let a = 1 {
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | } else if true {
|
|
|
|
LL | | println!("else-if in irrefutable if-let");
|
|
|
|
LL | | } else {
|
|
|
|
LL | | println!("else in irrefutable if-let");
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
warning: irrefutable if-let pattern
|
2019-10-24 00:00:00 +00:00
|
|
|
--> $DIR/if-let.rs:40:12
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | } else if let a = 1 {
|
2019-01-12 03:10:59 +00:00
|
|
|
| ____________^
|
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
warning: irrefutable if-let pattern
|
2019-10-24 00:00:00 +00:00
|
|
|
--> $DIR/if-let.rs:46:12
|
2019-01-12 03:10:59 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | } else if let a = 1 {
|
2019-01-12 03:10:59 +00:00
|
|
|
| ____________^
|
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2020-03-11 15:30:09 +00:00
|
|
|
warning: 6 warnings emitted
|
|
|
|
|