2019-07-02 21:30:28 +00:00
|
|
|
// build-pass (FIXME(62277): could be 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),
|
2019-10-24 00:00:00 +00:00
|
|
|
Void(Void), //~ WARN 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);
|
|
|
|
}
|