Skip to content

Commit 50671c1

Browse files
committed
---
yaml --- r: 277169 b: refs/heads/try c: daec3fe h: refs/heads/master i: 277167: 7eab26a
1 parent 3771da1 commit 50671c1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 44c78eeb4622c7e2c68cfe6a72ae86251426e181
4+
refs/heads/try: daec3fe4e6bd4af52e551c1e09ae345a80b42452
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc_privacy/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,8 @@ impl<'a, 'tcx: 'a, 'v> Visitor<'v> for SearchInterfaceForPrivateItemsVisitor<'a,
10231023
self.min_visibility = vis;
10241024
}
10251025
if !vis.is_at_least(self.required_visibility, &self.tcx.map) {
1026-
if self.old_error_set.contains(&ty.id) {
1026+
if self.tcx.sess.features.borrow().pub_restricted ||
1027+
self.old_error_set.contains(&ty.id) {
10271028
span_err!(self.tcx.sess, ty.span, E0446,
10281029
"private type in public interface");
10291030
} else {
@@ -1053,7 +1054,8 @@ impl<'a, 'tcx: 'a, 'v> Visitor<'v> for SearchInterfaceForPrivateItemsVisitor<'a,
10531054
self.min_visibility = vis;
10541055
}
10551056
if !vis.is_at_least(self.required_visibility, &self.tcx.map) {
1056-
if self.old_error_set.contains(&trait_ref.ref_id) {
1057+
if self.tcx.sess.features.borrow().pub_restricted ||
1058+
self.old_error_set.contains(&trait_ref.ref_id) {
10571059
span_err!(self.tcx.sess, trait_ref.path.span, E0445,
10581060
"private trait in public interface");
10591061
} else {

0 commit comments

Comments
 (0)