2020-04-19 19:27:28 -05:00
|
|
|
// check-pass
|
2018-10-31 21:57:37 -05:00
|
|
|
// compile-flags: -Wunused
|
|
|
|
|
|
|
|
// ensure there are no special warnings about uninhabited types
|
|
|
|
// when deriving Debug on an empty enum
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
2019-08-05 21:23:46 -05:00
|
|
|
enum Void {}
|
2018-10-31 21:57:37 -05:00
|
|
|
|
|
|
|
#[derive(Debug)]
|
2019-08-05 21:23:46 -05:00
|
|
|
enum Foo {
|
2018-10-31 21:57:37 -05:00
|
|
|
Bar(u8),
|
2022-06-09 22:14:24 -05:00
|
|
|
Void(Void), //~ WARN variant `Void` is never constructed
|
2018-10-31 21:57:37 -05:00
|
|
|
}
|
|
|
|
|
2019-08-05 21:23:46 -05:00
|
|
|
fn main() {
|
|
|
|
let x = Foo::Bar(42);
|
|
|
|
println!("{:?}", x);
|
|
|
|
}
|