Skip to content

Commit d8c7b49

Browse files
committed
---
yaml --- r: 174270 b: refs/heads/snap-stage3 c: 8115222 h: refs/heads/master v: v3
1 parent 9db3ee6 commit d8c7b49

File tree

5 files changed

+46
-5
lines changed

5 files changed

+46
-5
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: a833337943300db1c310a4cf9c84b7b4ef4e9468
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a9decbdc443f120d1ca2efb1798bfc20bad7c2d4
4+
refs/heads/snap-stage3: 811522260760d5c1d6a4c8162ba816a471f37232
55
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/librustc_privacy/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for PrivacyVisitor<'a, 'tcx> {
888888
struct type?!"),
889889
}
890890
}
891-
ast::ExprPath(..) => {
891+
ast::ExprPath(_) | ast::ExprQPath(_) => {
892892
let guard = |&: did: ast::DefId| {
893893
let fields = ty::lookup_struct_fields(self.tcx, did);
894894
let any_priv = fields.iter().any(|f| {

branches/snap-stage3/src/librustc_resolve/build_reduced_graph.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
999999
root: &Rc<Module>,
10001000
def_like: DefLike,
10011001
name: Name,
1002-
visibility: Visibility) {
1002+
def_visibility: Visibility) {
10031003
match def_like {
10041004
DlDef(def) => {
10051005
// Add the new child item, if necessary.
@@ -1027,7 +1027,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
10271027
DUMMY_SP);
10281028

10291029
self.handle_external_def(def,
1030-
visibility,
1030+
def_visibility,
10311031
&*child_name_bindings,
10321032
token::get_name(name).get(),
10331033
name,
@@ -1106,7 +1106,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
11061106
let def = DefFn(method_info.def_id, false);
11071107

11081108
// NB: not IMPORTABLE
1109-
let modifiers = if visibility == ast::Public {
1109+
let modifiers = if method_info.vis == ast::Public {
11101110
PUBLIC
11111111
} else {
11121112
DefModifiers::empty()
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
pub mod A {
12+
pub struct Foo;
13+
impl Foo {
14+
fn foo(&self) { }
15+
}
16+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// aux-build:issue-21202.rs
12+
13+
extern crate "issue-21202" as crate1;
14+
15+
use crate1::A;
16+
17+
mod B {
18+
use crate1::A::Foo;
19+
fn bar(f: Foo) {
20+
Foo::foo(&f);
21+
//~^ ERROR: function `foo` is private
22+
}
23+
}
24+
25+
fn main() { }

0 commit comments

Comments
 (0)