Skip to content

Commit 27eab1c

Browse files
---
yaml --- r: 277830 b: refs/heads/try c: 3f74c6a h: refs/heads/master
1 parent b2e7186 commit 27eab1c

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
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: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 566aa54b494524e4af48fd0d72cada6ebf138487
4+
refs/heads/try: 3f74c6afe0821778047ec46f29b815fc30f7ec1f
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc_trans/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ pub fn coerce_unsized_into<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
664664
}
665665
}
666666

667-
pub fn custom_coerce_unsize_info<'ccx, 'tcx>(ccx: &CrateContext<'ccx, 'tcx>,
667+
pub fn custom_coerce_unsize_info<'ccx, 'tcx>(ccx: &SharedCrateContext<'ccx, 'tcx>,
668668
source_ty: Ty<'tcx>,
669669
target_ty: Ty<'tcx>)
670670
-> CustomCoerceUnsized {
@@ -678,7 +678,7 @@ pub fn custom_coerce_unsize_info<'ccx, 'tcx>(ccx: &CrateContext<'ccx, 'tcx>,
678678
substs: ccx.tcx().mk_substs(trait_substs)
679679
});
680680

681-
match fulfill_obligation(ccx.shared(), DUMMY_SP, trait_ref) {
681+
match fulfill_obligation(ccx, DUMMY_SP, trait_ref) {
682682
traits::VtableImpl(traits::VtableImplData { impl_def_id, .. }) => {
683683
ccx.tcx().custom_coerce_unsized_kind(impl_def_id)
684684
}

branches/try/src/librustc_trans/collector.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ use syntax::parse::token;
211211

212212
use base::{custom_coerce_unsize_info, llvm_linkage_by_name};
213213
use context::CrateContext;
214-
use common::{fulfill_obligation, normalize_and_test_predicates,
215-
type_is_sized};
214+
use common::{fulfill_obligation, normalize_and_test_predicates, type_is_sized};
216215
use glue::{self, DropGlueKind};
217216
use llvm;
218217
use meth;
@@ -937,7 +936,7 @@ fn find_vtable_types_for_unsizing<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
937936
&ty::TyStruct(target_adt_def, target_substs)) => {
938937
assert_eq!(source_adt_def, target_adt_def);
939938

940-
let kind = custom_coerce_unsize_info(ccx, source_ty, target_ty);
939+
let kind = custom_coerce_unsize_info(ccx.shared(), source_ty, target_ty);
941940

942941
let coerce_index = match kind {
943942
CustomCoerceUnsized::Struct(i) => i

branches/try/src/librustc_trans/expr.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ fn coerce_unsized<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
510510
let source = unpack_datum!(bcx, source.to_ref_datum(bcx));
511511
assert!(target.kind.is_by_ref());
512512

513-
let kind = custom_coerce_unsize_info(bcx.ccx(), source.ty, target.ty);
513+
let kind = custom_coerce_unsize_info(bcx.ccx().shared(),
514+
source.ty,
515+
target.ty);
514516

515517
let repr_source = adt::represent_type(bcx.ccx(), source.ty);
516518
let src_fields = match &*repr_source {

0 commit comments

Comments
 (0)