Rollup merge of #21468 - sanxiyn:dead-variant, r=

This implements a wish suggested in #17410, detecting enum variants that are never constructed, even in the presence of `#[derive(Clone)]`. The implementation is general and not specific to `#[derive(Clone)]`.

r? @jakub-
This commit is contained in:
Manish Goregaokar
2015-03-13 18:12:05 +05:30
4 changed files with 94 additions and 1 deletions

View File

@@ -121,6 +121,7 @@ impl fmt::Display for TestName {
#[derive(Clone, Copy)]
enum NamePadding {
PadNone,
#[allow(dead_code)]
PadOnLeft,
PadOnRight,
}