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
|
|
|
|
| ^^
|
|
|
|
...
|
|
|
|
LL | / foo!(a, 1, { //~ WARN irrefutable if-let
|
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | });
|
|
|
|
| |_______- in this macro invocation
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
= note: #[warn(irrefutable_let_patterns)] on by default
|
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
|
|
|
|
| ^^
|
|
|
|
...
|
|
|
|
LL | / bar!(a, 1, { //~ WARN irrefutable if-let
|
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | });
|
|
|
|
| |_______- in this macro invocation
|
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:24:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | / if let a = 1 { //~ WARN irrefutable if-let
|
|
|
|
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
|
|
|
|
--> $DIR/if-let.rs:28:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | / if let a = 1 { //~ WARN irrefutable if-let
|
|
|
|
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
|
|
|
|
--> $DIR/if-let.rs:38:12
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-01-12 03:10:59 +00:00
|
|
|
LL | } else if let a = 1 { //~ WARN irrefutable if-let
|
|
|
|
| ____________^
|
|
|
|
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
|
|
|
|
--> $DIR/if-let.rs:44:12
|
|
|
|
|
|
|
|
|
LL | } else if let a = 1 { //~ WARN irrefutable if-let
|
|
|
|
| ____________^
|
|
|
|
LL | | println!("irrefutable pattern");
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2018-08-08 12:28:26 +00:00
|
|
|
|