Skip to content

Commit 3d3ac1d

Browse files
committed
---
yaml --- r: 40247 b: refs/heads/dist-snap c: 675c272 h: refs/heads/master i: 40245: f6ec045 40243: f2e8eef 40239: 9f62be0 v: v3
1 parent bd2f2ce commit 3d3ac1d

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: b7872fa13eb561956455eefbb06a63411cb4ad14
10+
refs/heads/dist-snap: 675c272dadc8cd7e529fda64904c87e8243fe94f
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/rustc/metadata/encoder.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::Serializer,
556556
}
557557
let add_to_index = |copy ebml_w| add_to_index_(item, ebml_w, index);
558558

559+
debug!("encoding info for item at %s",
560+
syntax::codemap::span_to_str(item.span, ecx.tcx.sess.codemap));
561+
559562
match item.node {
560563
item_const(_, _) => {
561564
add_to_index();
@@ -738,7 +741,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::Serializer,
738741
}
739742
}
740743
do opt_trait.iter() |associated_trait| {
741-
encode_trait_ref(ebml_w, ecx, *associated_trait)
744+
encode_trait_ref(ebml_w, ecx, *associated_trait);
742745
}
743746
encode_path(ecx, ebml_w, path, ast_map::path_name(item.ident));
744747
ebml_w.end_tag();

branches/dist-snap/src/rustc/middle/typeck/collect.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,20 @@ fn convert(ccx: @crate_ctxt, it: @ast::item) {
522522
region_param: rp,
523523
ty: selfty});
524524

525-
for ms_opt.each |ms| {
526-
let cms = convert_methods(ccx, *ms, rp, i_bounds);
527-
for trait_ref.each |t| {
528-
check_methods_against_trait(ccx, tps, rp, selfty, *t, cms);
525+
match ms_opt {
526+
Some(ref ms) => {
527+
let cms = convert_methods(ccx, *ms, rp, i_bounds);
528+
for trait_ref.each |t| {
529+
check_methods_against_trait(ccx, tps, rp, selfty, *t,
530+
cms);
531+
}
532+
}
533+
None => {
534+
// We still need to instantiate the trait ref here so that
535+
// metadata encoding will find the type.
536+
for trait_ref.each |trait_ref| {
537+
let _ = instantiate_trait_ref(ccx, *trait_ref, rp);
538+
}
529539
}
530540
}
531541
}

0 commit comments

Comments
 (0)