2022-06-10 12:14:24 +09:00
|
|
|
warning: variant `B` is never constructed
|
2021-07-15 10:33:51 -04:00
|
|
|
--> $DIR/issue-87097.rs:6:5
|
|
|
|
|
|
2022-06-10 12:14:24 +09:00
|
|
|
LL | enum Variant {
|
|
|
|
| ------- variant in this enum
|
|
|
|
LL | A,
|
2021-07-15 10:33:51 -04: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 07:46:33 -07:00
|
|
|
| |_____^
|
2021-07-15 10:33:51 -04:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
2022-09-18 19:55:36 +04:00
|
|
|
= note: `#[warn(unused_must_use)]` on by default
|
2021-07-15 10:33:51 -04: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 07:46:33 -07:00
|
|
|
| |_____^
|
2021-07-15 10:33:51 -04:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
|
|
|
|
|
|
|
warning: 3 warnings emitted
|
|
|
|
|