Skip to content

Commit 1bfd181

Browse files
committed
---
yaml --- r: 59669 b: refs/heads/snap-stage3 c: 62cbea1 h: refs/heads/master i: 59667: 19e061c v: v3
1 parent 025cdf8 commit 1bfd181

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 52f8b22d4f304abd6227f1476396b0a3a94e241f
4+
refs/heads/snap-stage3: 62cbea1ca1441a7d9c97d3c2aa36f9fa546ad9a4
55
refs/heads/try: c50a9d5b664478e533ba1d1d353213d70c8ad589
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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/snap-stage3/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)