From 599df16551ea12605ca50e182237e7c50a29af40 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sun, 25 Oct 2015 04:42:31 +0300 Subject: rustc_privacy: Expand public node set, build exported node set more correctly --- src/libsyntax/ast.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libsyntax') 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 -- cgit 1.4.1-3-g733a5