rust-clippy/tests/ui/empty_enum.rs

9 lines
181 B
Rust
Raw Normal View History

2017-02-05 05:59:39 +00:00
#![allow(dead_code)]
2018-07-28 15:34:52 +00:00
#![warn(clippy::empty_enum)]
// Enable never type to test empty enum lint
#![feature(never_type)]
2017-02-08 13:58:07 +00:00
enum Empty {}
//~^ ERROR: enum with no variants
2017-02-08 13:58:07 +00:00
2018-12-09 22:26:16 +00:00
fn main() {}