diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-10-25 04:42:31 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-10-25 04:42:31 +0300 |
| commit | 599df16551ea12605ca50e182237e7c50a29af40 (patch) | |
| tree | b1b6c1d913ebc5e18398ac4321b782b7bcd95006 /src/libsyntax | |
| parent | d2f41bd5be70544411e5ed42bcdb201e6ab25eb2 (diff) | |
| download | rust-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.rs | 6 |
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 |
