Skip to content

Commit bc14be1

Browse files
committed
---
yaml --- r: 110589 b: refs/heads/master c: df533c6 h: refs/heads/master i: 110587: 1fe57ff v: v3
1 parent 3524497 commit bc14be1

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 83d2c0b8a6f6c2ce25fe48b541f176ea88be8d99
2+
refs/heads/master: df533c6e87f5052667b0c03c918f95b51439fdba
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: e263ef1df7b892ed29e53313565eb05ab75e52f4
55
refs/heads/try: 597a645456b55e1c886ce15d23a192abdf4d55cf

trunk/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};

trunk/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)