Skip to content

Commit 7b0b1db

Browse files
committed
---
yaml --- r: 179651 b: refs/heads/master c: 0a0aa11 h: refs/heads/master i: 179649: 02af31a 179647: 426e6ed v: v3
1 parent 0017842 commit 7b0b1db

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0b1d5f01828fdb21e31071d149618d2e983342c5
2+
refs/heads/master: 0a0aa11bb1551ef3c0eda2a93d94077ba76b5150
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 0ba9e1fa52627404a1e5b90f745f96a872a0c564
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/src/librustc_privacy/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,9 @@ impl<'a, 'tcx, 'v> Visitor<'v> for PrivacyVisitor<'a, 'tcx> {
898898
ast::ExprStruct(_, ref fields, _) => {
899899
match ty::expr_ty(self.tcx, expr).sty {
900900
ty::ty_struct(ctor_id, _) => {
901+
// RFC 736: ensure all unmentioned fields are visible.
902+
// Rather than computing the set of unmentioned fields
903+
// (i.e. `all_fields - fields`), just check them all.
901904
let all_fields = ty::lookup_struct_fields(self.tcx, ctor_id);
902905
for field in all_fields {
903906
self.check_field(expr.span, ctor_id,

0 commit comments

Comments
 (0)