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