Skip to content

Commit 2746e51

Browse files
committed
---
yaml --- r: 35499 b: refs/heads/master c: 7ca9436 h: refs/heads/master i: 35497: b77ed30 35495: 17d6b3b v: v3
1 parent 8e811cf commit 2746e51

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e71ec06118fee49a86063c5eb7386f1000f56237
2+
refs/heads/master: 7ca94369dad596421276c26ab98bdaa7bb1787cf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/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)