Skip to content

Commit b10da64

Browse files
committed
---
yaml --- r: 187420 b: refs/heads/try c: eafdc71 h: refs/heads/master v: v3
1 parent 0f4b2f2 commit b10da64

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: 19cb8f32d894719ece5b2308dabab45be1b94fcf
5+
refs/heads/try: eafdc7135b79d2e51da740b67946512d949632a1
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc_privacy/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
233233
ast::ItemEnum(ref def, _) if public_first => {
234234
for variant in &def.variants {
235235
self.exported_items.insert(variant.node.id);
236+
self.public_items.insert(variant.node.id);
236237
}
237238
}
238239

@@ -321,6 +322,15 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
321322
Some(id) => { self.exported_items.insert(id); }
322323
None => {}
323324
}
325+
// fields can be public or private, so lets check
326+
for field in &def.fields {
327+
let vis = match field.node.kind {
328+
ast::NamedField(_, vis) | ast::UnnamedField(vis) => vis
329+
};
330+
if vis == ast::Public {
331+
self.public_items.insert(field.node.id);
332+
}
333+
}
324334
}
325335

326336
ast::ItemTy(ref ty, _) if public_first => {

0 commit comments

Comments
 (0)