Skip to content

Commit 244a766

Browse files
trans: Consistently name SharedCrateContext instances 'scx'
1 parent a90ce0a commit 244a766

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
@@ -665,7 +665,7 @@ pub fn coerce_unsized_into<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
665665
}
666666
}
667667

668-
pub fn custom_coerce_unsize_info<'ccx, 'tcx>(ccx: &SharedCrateContext<'ccx, 'tcx>,
668+
pub fn custom_coerce_unsize_info<'scx, 'tcx>(scx: &SharedCrateContext<'scx, 'tcx>,
669669
source_ty: Ty<'tcx>,
670670
target_ty: Ty<'tcx>)
671671
-> CustomCoerceUnsized {
@@ -675,13 +675,13 @@ pub fn custom_coerce_unsize_info<'ccx, 'tcx>(ccx: &SharedCrateContext<'ccx, 'tcx
675675
subst::VecPerParamSpace::empty());
676676

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

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

0 commit comments

Comments
 (0)