Skip to content

Commit d31c0a5

Browse files
committed
---
yaml --- r: 150718 b: refs/heads/try2 c: df533c6 h: refs/heads/master v: v3
1 parent 6892428 commit d31c0a5

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 83d2c0b8a6f6c2ce25fe48b541f176ea88be8d99
8+
refs/heads/try2: df533c6e87f5052667b0c03c918f95b51439fdba
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/liblibc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub use types::os::arch::c95::{c_ushort, clock_t, ptrdiff_t};
146146
pub use types::os::arch::c95::{size_t, time_t};
147147
pub use types::os::arch::c99::{c_longlong, c_ulonglong, intptr_t};
148148
pub use types::os::arch::c99::{uintptr_t};
149-
pub use types::os::arch::posix88::{dev_t, dirent_t, ino_t, mode_t};
149+
pub use types::os::arch::posix88::{dev_t, ino_t, mode_t};
150150
pub use types::os::arch::posix88::{off_t, pid_t, ssize_t};
151151

152152
pub use consts::os::c95::{_IOFBF, _IOLBF, _IONBF, BUFSIZ, EOF};

branches/try2/src/librustc/middle/resolve.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ impl NamespaceResult {
144144
_ => false
145145
}
146146
}
147+
fn is_unbound(&self) -> bool {
148+
match *self {
149+
UnboundResult => true,
150+
_ => false
151+
}
152+
}
147153
}
148154

149155
enum NameDefinition {
@@ -2449,8 +2455,7 @@ impl<'a> Resolver<'a> {
24492455
}
24502456
}
24512457

2452-
if import_resolution.value_target.borrow().is_none() &&
2453-
import_resolution.type_target.borrow().is_none() {
2458+
if value_result.is_unbound() && type_result.is_unbound() {
24542459
let msg = format!("unresolved import: there is no \
24552460
`{}` in `{}`",
24562461
token::get_ident(source),
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2014 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+
use a::f;
12+
use b::f;
13+
//~^ ERROR: unresolved import
14+
//~^^ ERROR: failed to resolve import
15+
16+
mod a { pub fn f() {} }
17+
mod b { }
18+
19+
fn main() {
20+
f();
21+
}

0 commit comments

Comments
 (0)