rust/src/test/ui/expr/if/if-let.stderr

68 lines
1.7 KiB
Plaintext
Raw Normal View History

warning: irrefutable if-let pattern
--> $DIR/if-let.rs:6:13
2018-08-08 12:28:26 +00:00
|
LL | if let $p = $e $b
2019-12-06 22:33:13 +00:00
| ^^^^^^^^^^^^^^^^^
...
2019-03-09 12:03:44 +00:00
LL | / foo!(a, 1, {
LL | | println!("irrefutable pattern");
LL | | });
| |_______- in this macro invocation
2018-08-08 12:28:26 +00:00
|
= note: `#[warn(irrefutable_let_patterns)]` on by default
= 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
warning: irrefutable if-let pattern
--> $DIR/if-let.rs:6:13
2018-08-08 12:28:26 +00:00
|
LL | if let $p = $e $b
2019-12-06 22:33:13 +00:00
| ^^^^^^^^^^^^^^^^^
...
2019-03-09 12:03:44 +00:00
LL | / bar!(a, 1, {
LL | | println!("irrefutable pattern");
LL | | });
| |_______- in this macro invocation
|
= 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
warning: irrefutable if-let pattern
--> $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 {
LL | | println!("irrefutable pattern");
LL | | }
| |_____^
2018-08-08 12:28:26 +00:00
warning: irrefutable if-let pattern
--> $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 {
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
warning: irrefutable if-let pattern
--> $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 {
| ____________^
LL | | println!("irrefutable pattern");
LL | | }
| |_____^
2018-08-08 12:28:26 +00:00
warning: irrefutable if-let pattern
--> $DIR/if-let.rs:46:12
|
2019-03-09 12:03:44 +00:00
LL | } else if let a = 1 {
| ____________^
LL | | println!("irrefutable pattern");
LL | | }
| |_____^
2018-08-08 12:28:26 +00:00
warning: 6 warnings emitted