Skip to content

Commit 9f2e87b

Browse files
committed
---
yaml --- r: 61311 b: refs/heads/try c: 62cbea1 h: refs/heads/master i: 61309: 6cb69a9 61307: c0652bd 61303: e201b8e 61295: 8490498 61279: 0478fe4 61247: 9d782c8 61183: 0d85eca v: v3
1 parent 31d1ce2 commit 9f2e87b

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
5-
refs/heads/try: 52f8b22d4f304abd6227f1476396b0a3a94e241f
5+
refs/heads/try: 62cbea1ca1441a7d9c97d3c2aa36f9fa546ad9a4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,8 @@ pub impl Resolver {
20582058
self.resolve_single_import(module_,
20592059
containing_module,
20602060
target,
2061-
source);
2061+
source,
2062+
span);
20622063
}
20632064
GlobImport => {
20642065
let span = import_directive.span;
@@ -2121,7 +2122,8 @@ pub impl Resolver {
21212122
module_: @mut Module,
21222123
containing_module: @mut Module,
21232124
target: ident,
2124-
source: ident)
2125+
source: ident,
2126+
span: span)
21252127
-> ResolveResult<()> {
21262128
debug!("(resolving single import) resolving `%s` = `%s::%s` from \
21272129
`%s`",
@@ -2325,14 +2327,14 @@ pub impl Resolver {
23252327
}
23262328

23272329
if resolve_fail {
2328-
self.session.err(fmt!("unresolved import: there is no `%s` in `%s`",
2329-
*self.session.str_of(source),
2330-
self.module_to_str(containing_module)));
2330+
self.session.span_err(span, fmt!("unresolved import: there is no `%s` in `%s`",
2331+
*self.session.str_of(source),
2332+
self.module_to_str(containing_module)));
23312333
return Failed;
23322334
} else if priv_fail {
2333-
self.session.err(fmt!("unresolved import: found `%s` in `%s` but it is private",
2334-
*self.session.str_of(source),
2335-
self.module_to_str(containing_module)));
2335+
self.session.span_err(span, fmt!("unresolved import: found `%s` in `%s` but it is \
2336+
private", *self.session.str_of(source),
2337+
self.module_to_str(containing_module)));
23362338
return Failed;
23372339
}
23382340

branches/try/src/test/compile-fail/unresolved-import.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
// except according to those terms.
1010

1111
use foo::bar; //~ ERROR unresolved import. maybe a missing `extern mod foo`?
12-
//~^ ERROR failed to resolve import
13-
use x = bar::baz; //~ ERROR unresolved import: could not find `baz` in `bar`
14-
//~^ ERROR failed to resolve import
12+
//~^ ERROR failed to resolve import `foo::bar`
13+
use x = bar::baz; //~ ERROR unresolved import: there is no `baz` in `bar`
14+
//~^ ERROR failed to resolve import `bar::baz`
1515

1616
mod bar {
1717
struct bar;

0 commit comments

Comments
 (0)