rollup merge of #17927 : alexcrichton/more-const

This commit is contained in:
Alex Crichton
2014-10-13 15:09:25 -07:00
6 changed files with 34 additions and 41 deletions

View File

@@ -1333,6 +1333,7 @@ impl Item_ {
pub fn descriptive_variant(&self) -> &str {
match *self {
ItemStatic(..) => "static item",
ItemConst(..) => "constant item",
ItemFn(..) => "function",
ItemMod(..) => "module",
ItemForeignMod(..) => "foreign module",
@@ -1340,7 +1341,8 @@ impl Item_ {
ItemEnum(..) => "enum",
ItemStruct(..) => "struct",
ItemTrait(..) => "trait",
_ => "item"
ItemMac(..) |
ItemImpl(..) => "item"
}
}
}