Skip to content

Commit 5ad8de3

Browse files
committed
---
yaml --- r: 32414 b: refs/heads/dist-snap c: 0a852e0 h: refs/heads/master v: v3
1 parent 8637012 commit 5ad8de3

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 9097410b433c0d7c7dca8f9296161b3074a8d21e
10+
refs/heads/dist-snap: 0a852e0da0503b3abcc2dd0b0858f64e3f4dc6b0
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/rustc/middle/resolve.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,23 +1091,24 @@ struct Resolver {
10911091
let atom = variant.node.name;
10921092
let (child, _) = self.add_child(atom, parent, ~[ValueNS],
10931093
variant.span);
1094+
let privacy = self.visibility_to_privacy(variant.node.vis);
10941095

10951096
match variant.node.kind {
10961097
tuple_variant_kind(_) => {
1097-
(*child).define_value(Public,
1098+
(*child).define_value(privacy,
10981099
def_variant(item_id,
10991100
local_def(variant.node.id)),
11001101
variant.span);
11011102
}
11021103
struct_variant_kind(_) => {
1103-
(*child).define_type(Public,
1104+
(*child).define_type(privacy,
11041105
def_variant(item_id,
11051106
local_def(variant.node.id)),
11061107
variant.span);
11071108
self.structs.insert(local_def(variant.node.id), false);
11081109
}
11091110
enum_variant_kind(enum_definition) => {
1110-
(*child).define_type(Public,
1111+
(*child).define_type(privacy,
11111112
def_ty(local_def(variant.node.id)),
11121113
variant.span);
11131114
for enum_definition.variants.each |variant| {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
mod a {
2+
enum Waffle {
3+
Belgian,
4+
Brussels,
5+
priv Liege
6+
}
7+
}
8+
9+
fn main() {
10+
let x = a::Liege; //~ ERROR unresolved name
11+
}

0 commit comments

Comments
 (0)