Skip to content

Commit 7c3d2f7

Browse files
committed
make a hit-list of functions I'd like to remove
1 parent 1ef95aa commit 7c3d2f7

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

src/librustc/dep_graph/dep_tracking_map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl<M: DepTrackingMapConfig> DepTrackingMap<M> {
8888
result
8989
}
9090

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

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

106-
pub fn entry(&mut self, k: M::Key) -> Entry<M::Key, M::Value> {
106+
pub fn __entry__(&mut self, k: M::Key) -> Entry<M::Key, M::Value> {
107107
self.write(&k);
108108
self.map.entry(k)
109109
}
@@ -129,7 +129,7 @@ impl<M: DepTrackingMapConfig> DepTrackingMap<M> {
129129
/// NOTE: Caution is required when using this method. You should
130130
/// be sure that nobody is **reading from the vector** while you
131131
/// are writing to it. Eventually, it'd be nice to remove this.
132-
pub fn push<E: Clone>(&mut self, k: M::Key, elem: E)
132+
pub fn __push__<E: Clone>(&mut self, k: M::Key, elem: E)
133133
where M: DepTrackingMapConfig<Value=Vec<E>>
134134
{
135135
self.write(&k);

src/librustc/ty/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
20622062
impl_trait_ref.is_some(),
20632063
impl_item_ref);
20642064
self.maps.associated_item.borrow_mut()
2065-
.insert(assoc_item.def_id, assoc_item);
2065+
.__insert__(assoc_item.def_id, assoc_item);
20662066
}
20672067
}
20682068

@@ -2071,7 +2071,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
20712071
let assoc_item =
20722072
self.associated_item_from_trait_item_ref(parent_def_id, trait_item_ref);
20732073
self.maps.associated_item.borrow_mut()
2074-
.insert(assoc_item.def_id, assoc_item);
2074+
.__insert__(assoc_item.def_id, assoc_item);
20752075
}
20762076
}
20772077

@@ -2367,7 +2367,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
23672367

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

2370-
self.maps.inherent_impls.borrow_mut().insert(type_id, inherent_impls);
2370+
self.maps.inherent_impls.borrow_mut().__insert__(type_id, inherent_impls);
23712371
self.populated_external_types.borrow_mut().insert(type_id);
23722372
}
23732373

src/librustc_metadata/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ impl<'a, 'tcx> CrateMetadata {
527527

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

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

590590
adt

src/librustc_typeck/coherence/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ fn visit_implementation_of_coerce_unsized<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
332332
infcx.resolve_regions_and_report_errors(&free_regions, impl_node_id);
333333

334334
if let Some(kind) = kind {
335-
tcx.maps.custom_coerce_unsized_kind.borrow_mut().insert(impl_did, kind);
335+
tcx.maps.custom_coerce_unsized_kind.borrow_mut().__insert__(impl_did, kind);
336336
}
337337
});
338338
}

src/librustc_typeck/coherence/inherent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ impl<'a, 'tcx> InherentCollect<'a, 'tcx> {
227227
// because we are doing this as a pre-pass before anyone
228228
// actually reads from `inherent_impls` -- and we know this is
229229
// true beacuse we hold the refcell lock.
230-
self.tcx.maps.inherent_impls.borrow_mut().push(def_id, impl_def_id);
230+
self.tcx.maps.inherent_impls.borrow_mut().__push__(def_id, impl_def_id);
231231
} else {
232232
struct_span_err!(self.tcx.sess,
233233
item.span,

src/librustc_typeck/variance/solve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<'a, 'tcx> SolveContext<'a, 'tcx> {
139139

140140
tcx.maps.variances
141141
.borrow_mut()
142-
.insert(item_def_id, Rc::new(item_variances));
142+
.__insert__(item_def_id, Rc::new(item_variances));
143143
}
144144
}
145145

src/librustc_typeck/variance/terms.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl<'a, 'tcx> TermsContext<'a, 'tcx> {
180180
let item_def_id = self.tcx.hir.local_def_id(item_id);
181181
self.tcx.maps.variances
182182
.borrow_mut()
183-
.insert(item_def_id, self.empty_variances.clone());
183+
.__insert__(item_def_id, self.empty_variances.clone());
184184
}
185185
}
186186

0 commit comments

Comments
 (0)