diff --git a/src/librustc_trans/context.rs b/src/librustc_trans/context.rs index 88edddad8c3..24095929f4f 100644 --- a/src/librustc_trans/context.rs +++ b/src/librustc_trans/context.rs @@ -756,7 +756,7 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> { } pub fn statics<'a>(&'a self) -> &'a RefCell> { - &self.local.statics + &self.local().statics } pub fn impl_method_cache<'a>(&'a self) diff --git a/src/librustc_trans/mir/constant.rs b/src/librustc_trans/mir/constant.rs index 93206179837..267d9e9a23a 100644 --- a/src/librustc_trans/mir/constant.rs +++ b/src/librustc_trans/mir/constant.rs @@ -233,7 +233,7 @@ impl<'a, 'tcx> MirConstContext<'a, 'tcx> { let trait_id = trait_item.container().id(); let substs = instance.substs; let trait_ref = ty::Binder(substs.to_trait_ref(ccx.tcx(), trait_id)); - let vtable = common::fulfill_obligation(ccx, DUMMY_SP, trait_ref); + let vtable = common::fulfill_obligation(ccx.shared(), DUMMY_SP, trait_ref); if let traits::VtableImpl(vtable_impl) = vtable { let name = ccx.tcx().item_name(instance.def); for ac in ccx.tcx().associated_consts(vtable_impl.impl_def_id) {