Skip to content

Commit 9c1b554

Browse files
committed
---
yaml --- r: 14206 b: refs/heads/try c: 2ec3a0b h: refs/heads/master v: v3
1 parent 31b52c1 commit 9c1b554

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: d972226567c523c6d81a343f742784b0a5e8d681
5+
refs/heads/try: 2ec3a0b60833736a3c0d805768885b4392c36100
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/comp/metadata/csearch.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ fn resolve_path(cstore: cstore::cstore, cnum: ast::crate_num,
6060
fn get_item_path(tcx: ty::ctxt, def: ast::def_id) -> ast_map::path {
6161
let cstore = tcx.sess.cstore;
6262
let cdata = cstore::get_crate_data(cstore, def.crate);
63-
ret decoder::get_item_path(cdata, def.node);
63+
let path = decoder::get_item_path(cdata, def.node);
64+
[ast_map::path_mod(cdata.name)] + path
6465
}
6566

6667
fn get_enum_variants(tcx: ty::ctxt, def: ast::def_id) -> [ty::variant_info] {

branches/try/src/comp/middle/ast_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn path_to_str_with_sep(p: path, sep: str) -> str {
1717
}
1818

1919
fn path_to_str(p: path) -> str {
20-
path_to_str_with_sep(p, "::")
20+
"::" + path_to_str_with_sep(p, "::")
2121
}
2222

2323
enum ast_node {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Test that we use fully-qualified type names in error messages.
2+
3+
fn main() {
4+
let x: option<uint>;
5+
x = 5;
6+
//!^ ERROR mismatched types: expected `::core::option::t<uint>`
7+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Test that we use fully-qualified type names in error messages.
2+
3+
mod x {
4+
enum foo { }
5+
}
6+
7+
mod y {
8+
enum foo { }
9+
}
10+
11+
fn bar(x: x::foo) -> y::foo {
12+
ret x;
13+
//!^ ERROR mismatched types: expected `::y::foo` but found `::x::foo`
14+
}
15+
16+
fn main() {
17+
}

0 commit comments

Comments
 (0)