about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-10-25 04:42:31 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-10-25 04:42:31 +0300
commit599df16551ea12605ca50e182237e7c50a29af40 (patch)
treeb1b6c1d913ebc5e18398ac4321b782b7bcd95006 /src/libsyntax
parentd2f41bd5be70544411e5ed42bcdb201e6ab25eb2 (diff)
downloadrust-599df16551ea12605ca50e182237e7c50a29af40.tar.gz
rust-599df16551ea12605ca50e182237e7c50a29af40.zip
rustc_privacy: Expand public node set, build exported node set more correctly
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index a45f5c9048c..76c4088609b 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -1737,6 +1737,12 @@ impl StructFieldKind {
             NamedField(..) => false,
         }
     }
+
+    pub fn visibility(&self) -> Visibility {
+        match *self {
+            NamedField(_, vis) | UnnamedField(vis) => vis
+        }
+    }
 }
 
 /// Fields and Ids of enum variants and structs