Skip to content

Commit 78bb6d1

Browse files
committed
---
yaml --- r: 30963 b: refs/heads/incoming c: 2f451a7 h: refs/heads/master i: 30961: d110927 30959: 7910ef5 v: v3
1 parent 5952088 commit 78bb6d1

File tree

6 files changed

+30
-14
lines changed

6 files changed

+30
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 8a5545e9cd3f9fa82e8003c2e71eee595492ad64
9+
refs/heads/incoming: 2f451a7bd7d856daad1e487f7bc7a14c40840c2d
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/gc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ with destructors.
2929
#[forbid(deprecated_mode)];
3030
#[forbid(deprecated_pattern)];
3131

32-
use stackwalk::Word;
32+
pub use stackwalk::Word;
3333
use libc::size_t;
3434
use libc::uintptr_t;
3535
use send_map::linear::LinearMap;

branches/incoming/src/libcore/os.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
use libc::{c_char, c_void, c_int, c_uint, size_t, ssize_t,
2424
mode_t, pid_t, FILE};
25-
use libc::{close, fclose};
25+
pub use libc::{close, fclose};
2626

2727
use option::{Some, None};
2828

@@ -225,7 +225,7 @@ mod global_env {
225225
pub fn setenv(n: &str, v: &str) {
226226
do str::as_c_str(n) |nbuf| {
227227
do str::as_c_str(v) |vbuf| {
228-
libc::setenv(nbuf, vbuf, 1i32);
228+
libc::funcs::posix01::unistd::setenv(nbuf, vbuf, 1i32);
229229
}
230230
}
231231
}
@@ -384,8 +384,8 @@ pub fn self_exe_path() -> Option<Path> {
384384
#[cfg(target_os = "macos")]
385385
fn load_self() -> Option<~str> {
386386
do fill_charp_buf() |buf, sz| {
387-
libc::_NSGetExecutablePath(buf, ptr::mut_addr_of(&(sz as u32)))
388-
== (0 as c_int)
387+
libc::funcs::extra::_NSGetExecutablePath(
388+
buf, ptr::mut_addr_of(&(sz as u32))) == (0 as c_int)
389389
}
390390
}
391391

branches/incoming/src/libcore/repr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ use cast::transmute;
1313
use intrinsic::{TyDesc, TyVisitor, visit_tydesc};
1414
use reflect::{MovePtr, MovePtrAdaptor};
1515
use vec::raw::{VecRepr, UnboxedVecRepr, SliceRepr};
16-
use box::raw::{BoxRepr, BoxHeaderRepr};
16+
pub use box::raw::BoxRepr;
17+
use box::raw::BoxHeaderRepr;
1718

1819
/// Helpers
1920

branches/incoming/src/libsyntax/parse/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,8 +3511,8 @@ impl parser {
35113511
self.token_is_keyword(~"mod", next_tok))
35123512
}
35133513

3514-
fn parse_view_item(+attrs: ~[attribute]) -> @view_item {
3515-
let lo = self.span.lo, vis = self.parse_visibility();
3514+
fn parse_view_item(+attrs: ~[attribute], vis: visibility) -> @view_item {
3515+
let lo = self.span.lo;
35163516
let node = if self.eat_keyword(~"use") {
35173517
self.parse_use()
35183518
} else if self.eat_keyword(~"export") {
@@ -3644,7 +3644,7 @@ impl parser {
36443644
_ => self.unexpected()
36453645
}
36463646
} else if self.is_view_item() {
3647-
let vi = self.parse_view_item(outer_attrs);
3647+
let vi = self.parse_view_item(outer_attrs, vis);
36483648
return spanned(lo, vi.span.hi, cdir_view_item(vi));
36493649
}
36503650
return self.fatal(~"expected crate directive");

branches/incoming/src/rustc/middle/resolve.rs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,7 @@ struct ImportResolution {
367367
mut used: bool,
368368
}
369369

370-
fn ImportResolution(privacy: Privacy,
371-
span: span) -> ImportResolution {
370+
fn ImportResolution(privacy: Privacy, span: span) -> ImportResolution {
372371
ImportResolution {
373372
privacy: privacy,
374373
span: span,
@@ -1639,11 +1638,20 @@ impl Resolver {
16391638

16401639
match *subclass {
16411640
SingleImport(target, _, _) => {
1641+
debug!("(building import directive) building import \
1642+
directive: privacy %? %s::%s",
1643+
privacy,
1644+
self.idents_to_str(module_path.get()),
1645+
self.session.str_of(target));
1646+
16421647
match module_.import_resolutions.find(target) {
16431648
Some(resolution) => {
1649+
debug!("(building import directive) bumping \
1650+
reference");
16441651
resolution.outstanding_references += 1u;
16451652
}
16461653
None => {
1654+
debug!("(building import directive) creating new");
16471655
let resolution = @ImportResolution(privacy, span);
16481656
resolution.outstanding_references = 1u;
16491657
module_.import_resolutions.insert(target, resolution);
@@ -1967,6 +1975,12 @@ impl Resolver {
19671975
namespace: Namespace)
19681976
-> NamespaceResult {
19691977

1978+
// Import resolutions must be declared with "pub"
1979+
// in order to be exported.
1980+
if import_resolution.privacy == Private {
1981+
return UnboundResult;
1982+
}
1983+
19701984
match (*import_resolution).
19711985
target_for_namespace(namespace) {
19721986
None => {
@@ -4229,7 +4243,8 @@ impl Resolver {
42294243
42304244
// Next, search import resolutions.
42314245
match containing_module.import_resolutions.find(name) {
4232-
Some(import_resolution) => {
4246+
Some(import_resolution) if import_resolution.privacy == Public ||
4247+
xray == Xray => {
42334248
match (*import_resolution).target_for_namespace(namespace) {
42344249
Some(target) => {
42354250
match (*target.bindings)
@@ -4252,7 +4267,7 @@ impl Resolver {
42524267
}
42534268
}
42544269
}
4255-
None => {
4270+
Some(_) | None => {
42564271
return NoNameDefinition;
42574272
}
42584273
}

0 commit comments

Comments
 (0)