Skip to content

Commit

Permalink
make a hit-list of functions I'd like to remove
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Mar 17, 2017
1 parent 1ef95aa commit 7c3d2f7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/librustc/dep_graph/dep_tracking_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl<M: DepTrackingMapConfig> DepTrackingMap<M> {
result
}

pub fn insert(&mut self, k: M::Key, v: M::Value) {
pub fn __insert__(&mut self, k: M::Key, v: M::Value) {
self.write(&k);

// If we ever read a `None` value for this key, we do not want
Expand All @@ -103,7 +103,7 @@ impl<M: DepTrackingMapConfig> DepTrackingMap<M> {
assert!(old_value.is_none(), "inserted value twice");
}

pub fn entry(&mut self, k: M::Key) -> Entry<M::Key, M::Value> {
pub fn __entry__(&mut self, k: M::Key) -> Entry<M::Key, M::Value> {
self.write(&k);
self.map.entry(k)
}
Expand All @@ -129,7 +129,7 @@ impl<M: DepTrackingMapConfig> DepTrackingMap<M> {
/// NOTE: Caution is required when using this method. You should
/// be sure that nobody is **reading from the vector** while you
/// are writing to it. Eventually, it'd be nice to remove this.
pub fn push<E: Clone>(&mut self, k: M::Key, elem: E)
pub fn __push__<E: Clone>(&mut self, k: M::Key, elem: E)
where M: DepTrackingMapConfig<Value=Vec<E>>
{
self.write(&k);
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
impl_trait_ref.is_some(),
impl_item_ref);
self.maps.associated_item.borrow_mut()
.insert(assoc_item.def_id, assoc_item);
.__insert__(assoc_item.def_id, assoc_item);
}
}

Expand All @@ -2071,7 +2071,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
let assoc_item =
self.associated_item_from_trait_item_ref(parent_def_id, trait_item_ref);
self.maps.associated_item.borrow_mut()
.insert(assoc_item.def_id, assoc_item);
.__insert__(assoc_item.def_id, assoc_item);
}
}

Expand Down Expand Up @@ -2367,7 +2367,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {

let inherent_impls = self.sess.cstore.inherent_implementations_for_type(type_id);

self.maps.inherent_impls.borrow_mut().insert(type_id, inherent_impls);
self.maps.inherent_impls.borrow_mut().__insert__(type_id, inherent_impls);
self.populated_external_types.borrow_mut().insert(type_id);
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc_metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ impl<'a, 'tcx> CrateMetadata {

if let ty::VariantDiscr::Explicit(def_id) = data.discr {
let result = data.evaluated_discr.map_or(Err(()), Ok);
tcx.maps.monomorphic_const_eval.borrow_mut().insert(def_id, result);
tcx.maps.monomorphic_const_eval.borrow_mut().__insert__(def_id, result);
}

(ty::VariantDef {
Expand Down Expand Up @@ -584,7 +584,7 @@ impl<'a, 'tcx> CrateMetadata {
let adt = tcx.alloc_adt_def(did, kind, variants, repr);
if let Some(ctor_index) = ctor_index {
// Make adt definition available through constructor id as well.
tcx.maps.adt_def.borrow_mut().insert(self.local_def_id(ctor_index), adt);
tcx.maps.adt_def.borrow_mut().__insert__(self.local_def_id(ctor_index), adt);
}

adt
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/coherence/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ fn visit_implementation_of_coerce_unsized<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
infcx.resolve_regions_and_report_errors(&free_regions, impl_node_id);

if let Some(kind) = kind {
tcx.maps.custom_coerce_unsized_kind.borrow_mut().insert(impl_did, kind);
tcx.maps.custom_coerce_unsized_kind.borrow_mut().__insert__(impl_did, kind);
}
});
}
2 changes: 1 addition & 1 deletion src/librustc_typeck/coherence/inherent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl<'a, 'tcx> InherentCollect<'a, 'tcx> {
// because we are doing this as a pre-pass before anyone
// actually reads from `inherent_impls` -- and we know this is
// true beacuse we hold the refcell lock.
self.tcx.maps.inherent_impls.borrow_mut().push(def_id, impl_def_id);
self.tcx.maps.inherent_impls.borrow_mut().__push__(def_id, impl_def_id);
} else {
struct_span_err!(self.tcx.sess,
item.span,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/variance/solve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl<'a, 'tcx> SolveContext<'a, 'tcx> {

tcx.maps.variances
.borrow_mut()
.insert(item_def_id, Rc::new(item_variances));
.__insert__(item_def_id, Rc::new(item_variances));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/variance/terms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl<'a, 'tcx> TermsContext<'a, 'tcx> {
let item_def_id = self.tcx.hir.local_def_id(item_id);
self.tcx.maps.variances
.borrow_mut()
.insert(item_def_id, self.empty_variances.clone());
.__insert__(item_def_id, self.empty_variances.clone());
}
}

Expand Down

0 comments on commit 7c3d2f7

Please sign in to comment.