Skip to content

Commit b11a4c2

Browse files
committed
---
yaml --- r: 39357 b: refs/heads/incoming c: 7ca9436 h: refs/heads/master i: 39355: 3f0452a v: v3
1 parent 4c17ae7 commit b11a4c2

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: e71ec06118fee49a86063c5eb7386f1000f56237
9+
refs/heads/incoming: 7ca94369dad596421276c26ab98bdaa7bb1787cf
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/librustc/metadata/encoder.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Serializer,
768768
for traits.each |associated_trait| {
769769
encode_trait_ref(ebml_w, ecx, *associated_trait)
770770
}
771+
771772
ebml_w.end_tag();
772773

773774
// Now, output all of the static methods as items. Note that for the
@@ -789,7 +790,9 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: writer::Serializer,
789790
let polyty = ecx.tcx.tcache.get(local_def(ty_m.id));
790791
encode_ty_type_param_bounds(ebml_w, ecx, polyty.bounds);
791792
encode_type(ecx, ebml_w, polyty.ty);
792-
encode_path(ecx, ebml_w, path, ast_map::path_name(ty_m.ident));
793+
let m_path = vec::append_one(path,
794+
ast_map::path_name(item.ident));
795+
encode_path(ecx, ebml_w, m_path, ast_map::path_name(ty_m.ident));
793796
ebml_w.end_tag();
794797
}
795798

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pub mod num {
2+
pub trait Num2 {
3+
static pure fn from_int2(n: int) -> self;
4+
}
5+
}
6+
7+
pub mod float {
8+
impl float: num::Num2 {
9+
static pure fn from_int2(n: int) -> float { return n as float; }
10+
}
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// aux-build:static_fn_trait_xc_aux.rs
2+
3+
extern mod mycore(name ="static_fn_trait_xc_aux");
4+
5+
use mycore::num;
6+
7+
fn main() {
8+
let _1:float = num::from_int2(1i);
9+
}

0 commit comments

Comments
 (0)