diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-10 08:31:13 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-12 12:15:22 -0700 |
| commit | 18e41299f9368c593be688792962a6d0c299c9bc (patch) | |
| tree | 4e145891055f4368a346d92d11cd6b48779d3d03 /src/libsyntax | |
| parent | 86509d8d7ab68c5e4202dea9ff1bfb79409f2f8d (diff) | |
| download | rust-18e41299f9368c593be688792962a6d0c299c9bc.tar.gz rust-18e41299f9368c593be688792962a6d0c299c9bc.zip | |
rustc: Warn about dead constants
A few catch-all blocks ended up not having this case for constants. Closes #17925
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 274bb2e39e0..be79b18bfe9 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1334,6 +1334,7 @@ impl Item_ { pub fn descriptive_variant(&self) -> &str { match *self { ItemStatic(..) => "static item", + ItemConst(..) => "constant item", ItemFn(..) => "function", ItemMod(..) => "module", ItemForeignMod(..) => "foreign module", @@ -1341,7 +1342,8 @@ impl Item_ { ItemEnum(..) => "enum", ItemStruct(..) => "struct", ItemTrait(..) => "trait", - _ => "item" + ItemMac(..) | + ItemImpl(..) => "item" } } } |
