mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 04:55:22 +03:00
26 lines
398 B
Rust
26 lines
398 B
Rust
#![warn(clippy::empty_enum)]
|
|
// Enable never type to test empty enum lint
|
|
#![feature(never_type)]
|
|
|
|
enum Empty {}
|
|
//~^ empty_enum
|
|
|
|
mod issue15910 {
|
|
enum NotReallyEmpty {
|
|
#[cfg(false)]
|
|
Hidden,
|
|
}
|
|
|
|
enum OneVisibleVariant {
|
|
#[cfg(false)]
|
|
Hidden,
|
|
Visible,
|
|
}
|
|
|
|
enum CfgInsideVariant {
|
|
Variant(#[cfg(false)] String),
|
|
}
|
|
}
|
|
|
|
fn main() {}
|