syntax: Permit visibility on tuple fields

This change is in preparation for #8122. Nothing is currently done with these
visibility qualifiers, they are just parsed and accepted by the compiler.

RFC: 0004-private-fields
This commit is contained in:
Alex Crichton 2014-03-25 16:53:52 -07:00
parent 104aaa44e8
commit 7de48419ee
10 changed files with 30 additions and 21 deletions

View file

@ -290,8 +290,7 @@ pub fn split_trait_methods(trait_methods: &[TraitMethod])
pub fn struct_field_visibility(field: ast::StructField) -> Visibility {
match field.node.kind {
ast::NamedField(_, visibility) => visibility,
ast::UnnamedField => ast::Public
ast::NamedField(_, v) | ast::UnnamedField(v) => v
}
}