2022-06-09 22:14:24 -05:00
|
|
|
warning: variant `B` is never constructed
|
2021-07-15 09:33:51 -05:00
|
|
|
--> $DIR/issue-87097.rs:6:5
|
|
|
|
|
|
2022-06-09 22:14:24 -05:00
|
|
|
LL | enum Variant {
|
|
|
|
| ------- variant in this enum
|
|
|
|
LL | A,
|
2021-07-15 09:33:51 -05:00
|
|
|
LL | B,
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= note: `#[warn(dead_code)]` on by default
|
|
|
|
|
|
|
|
warning: unused closure that must be used
|
|
|
|
--> $DIR/issue-87097.rs:17:5
|
|
|
|
|
|
|
|
|
LL | / || match out_ref {
|
|
|
|
LL | | Variant::A => (),
|
|
|
|
LL | | Variant::B => (),
|
|
|
|
LL | | };
|
2022-08-16 09:46:33 -05:00
|
|
|
| |_____^
|
2021-07-15 09:33:51 -05:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(unused_must_use)]` on by default
|
2021-07-15 09:33:51 -05:00
|
|
|
|
|
|
|
warning: unused closure that must be used
|
|
|
|
--> $DIR/issue-87097.rs:26:5
|
|
|
|
|
|
|
|
|
LL | / || match here.field {
|
|
|
|
LL | | Variant::A => (),
|
|
|
|
LL | | Variant::B => (),
|
|
|
|
LL | | };
|
2022-08-16 09:46:33 -05:00
|
|
|
| |_____^
|
2021-07-15 09:33:51 -05:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
|
|
|
|
|
|
|
warning: 3 warnings emitted
|
|
|
|
|