Fix rustdoc output of enums with private variants

Previously, if every variant was private, it would display as a
variantless enum instead of having the "some variants stripped" comment.
This commit is contained in:
Steven Fackler
2013-12-16 21:30:02 -08:00
parent c2c2c4d6f3
commit 758f6e6e68
2 changed files with 6 additions and 11 deletions

View File

@@ -1295,7 +1295,7 @@ fn item_enum(w: &mut Writer, it: &clean::Item, e: &clean::Enum) {
VisSpace(it.visibility),
it.name.get_ref().as_slice(),
e.generics);
if e.variants.len() == 0 {
if e.variants.len() == 0 && !e.variants_stripped {
write!(w, " \\{\\}");
} else {
write!(w, " \\{\n");