Skip to content

Commit 86a691a

Browse files
trans: Consistently name SharedCrateContext instances 'scx'
1 parent b89a5d1 commit 86a691a

File tree

3 files changed

+119
-119
lines changed

3 files changed

+119
-119
lines changed

src/librustc_trans/base.rs

+10-10
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: &SharedCrateContext<'ccx, 'tcx>,
667+
pub fn custom_coerce_unsize_info<'scx, 'tcx>(scx: &SharedCrateContext<'scx, 'tcx>,
668668
source_ty: Ty<'tcx>,
669669
target_ty: Ty<'tcx>)
670670
-> CustomCoerceUnsized {
@@ -674,13 +674,13 @@ pub fn custom_coerce_unsize_info<'ccx, 'tcx>(ccx: &SharedCrateContext<'ccx, 'tcx
674674
subst::VecPerParamSpace::empty());
675675

676676
let trait_ref = ty::Binder(ty::TraitRef {
677-
def_id: ccx.tcx().lang_items.coerce_unsized_trait().unwrap(),
678-
substs: ccx.tcx().mk_substs(trait_substs)
677+
def_id: scx.tcx().lang_items.coerce_unsized_trait().unwrap(),
678+
substs: scx.tcx().mk_substs(trait_substs)
679679
});
680680

681-
match fulfill_obligation(ccx, DUMMY_SP, trait_ref) {
681+
match fulfill_obligation(scx, DUMMY_SP, trait_ref) {
682682
traits::VtableImpl(traits::VtableImplData { impl_def_id, .. }) => {
683-
ccx.tcx().custom_coerce_unsized_kind(impl_def_id)
683+
scx.tcx().custom_coerce_unsized_kind(impl_def_id)
684684
}
685685
vtable => {
686686
bug!("invalid CoerceUnsized vtable: {:?}", vtable);
@@ -2660,10 +2660,10 @@ fn iter_functions(llmod: llvm::ModuleRef) -> ValueIter {
26602660
///
26612661
/// This list is later used by linkers to determine the set of symbols needed to
26622662
/// be exposed from a dynamic library and it's also encoded into the metadata.
2663-
pub fn filter_reachable_ids(ccx: &SharedCrateContext) -> NodeSet {
2664-
ccx.reachable().iter().map(|x| *x).filter(|id| {
2663+
pub fn filter_reachable_ids(scx: &SharedCrateContext) -> NodeSet {
2664+
scx.reachable().iter().map(|x| *x).filter(|id| {
26652665
// First, only worry about nodes which have a symbol name
2666-
ccx.item_symbols().borrow().contains_key(id)
2666+
scx.item_symbols().borrow().contains_key(id)
26672667
}).filter(|&id| {
26682668
// Next, we want to ignore some FFI functions that are not exposed from
26692669
// this crate. Reachable FFI functions can be lumped into two
@@ -2678,9 +2678,9 @@ pub fn filter_reachable_ids(ccx: &SharedCrateContext) -> NodeSet {
26782678
//
26792679
// As a result, if this id is an FFI item (foreign item) then we only
26802680
// let it through if it's included statically.
2681-
match ccx.tcx().map.get(id) {
2681+
match scx.tcx().map.get(id) {
26822682
hir_map::NodeForeignItem(..) => {
2683-
ccx.sess().cstore.is_statically_included_foreign_item(id)
2683+
scx.sess().cstore.is_statically_included_foreign_item(id)
26842684
}
26852685
_ => true,
26862686
}

0 commit comments

Comments
 (0)