3a023e7e58
add comments in `store_dead_field_or_variant` support multiple log level add a item ident label fix ui tests fix a ui test fix a rustdoc ui test use let chain refactor: remove `store_dead_field_or_variant` fix a tiny bug
20 lines
348 B
Rust
20 lines
348 B
Rust
// check-pass
|
|
// compile-flags: -Wunused
|
|
|
|
// ensure there are no special warnings about uninhabited types
|
|
// when deriving Debug on an empty enum
|
|
|
|
#[derive(Debug)]
|
|
enum Void {}
|
|
|
|
#[derive(Debug)]
|
|
enum Foo {
|
|
Bar(u8),
|
|
Void(Void), //~ WARN variant `Void` is never constructed
|
|
}
|
|
|
|
fn main() {
|
|
let x = Foo::Bar(42);
|
|
println!("{:?}", x);
|
|
}
|