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:
parent
104aaa44e8
commit
7de48419ee
10 changed files with 30 additions and 21 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue