Skip to content

Commit 26c9a50

Browse files
committed
---
yaml --- r: 80395 b: refs/heads/snap-stage3 c: d87078b h: refs/heads/master i: 80393: 6ce743a 80391: 807ae16 v: v3
1 parent 486a62d commit 26c9a50

File tree

5 files changed

+50
-3
lines changed

5 files changed

+50
-3
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: 3e1803f3af1adc1b2e5595650f6920f40bbedc2e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 610c0cdf11ea350793fa9a7b9d0af96f8ed5ab94
4+
refs/heads/snap-stage3: d87078be727f06581b0d1fc6642abcc3ea6aae31
55
refs/heads/try: 71bebebc37fbb229877da88dde13c2f35913bd77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/metadata/encoder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,8 @@ fn encode_info_for_item(ecx: &EncodeContext,
905905
encode_type(ecx, ebml_w, node_id_to_type(tcx, item.id));
906906
encode_symbol(ecx, ebml_w, item.id);
907907
encode_name(ecx, ebml_w, item.ident);
908-
encode_path(ecx, ebml_w, path, ast_map::path_name(item.ident));
908+
let elt = ast_map::path_pretty_name(item.ident, item.id as u64);
909+
encode_path(ecx, ebml_w, path, elt);
909910
(ecx.encode_inlined_item)(ecx, ebml_w, path, ii_item(item));
910911
ebml_w.end_tag();
911912
}

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2488,7 +2488,8 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
24882488
let val = match item {
24892489
ast_map::node_item(i, pth) => {
24902490

2491-
let my_path = vec::append((*pth).clone(), [path_name(i.ident)]);
2491+
let elt = path_pretty_name(i.ident, id as u64);
2492+
let my_path = vec::append_one((*pth).clone(), elt);
24922493
let ty = ty::node_id_to_type(ccx.tcx, i.id);
24932494
let sym = exported_name(ccx, my_path, ty, i.attrs);
24942495

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2013 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+
pub fn foo<T>() -> &'static int {
12+
if false {
13+
static a: int = 4;
14+
return &a;
15+
} else {
16+
static a: int = 5;
17+
return &a;
18+
}
19+
}
20+
21+
pub fn bar() -> &'static int {
22+
foo::<int>()
23+
}
24+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2013 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+
// aux-build:issue_9188.rs
12+
// xfail-fast windows doesn't like aux-build
13+
14+
extern mod issue_9188;
15+
16+
fn main() {
17+
let a = issue_9188::bar();
18+
let b = issue_9188::foo::<int>();
19+
assert_eq!(*a, *b);
20+
}
21+

0 commit comments

Comments
 (0)