mirror of https://github.com/rust-lang/rust.git
Move EvaluationCache::clear.
This commit is contained in:
parent
551cc5ebe6
commit
735d664e74
|
@ -3560,13 +3560,6 @@ impl<'tcx> TraitObligation<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx> EvaluationCache<'tcx> {
|
||||
/// Actually frees the underlying memory in contrast to what stdlib containers do on `clear`
|
||||
pub fn clear(&self) {
|
||||
*self.hashmap.borrow_mut() = Default::default();
|
||||
}
|
||||
}
|
||||
|
||||
impl<'o, 'tcx> TraitObligationStack<'o, 'tcx> {
|
||||
fn list(&'o self) -> TraitObligationStackList<'o, 'tcx> {
|
||||
TraitObligationStackList::with(self)
|
||||
|
|
|
@ -265,6 +265,13 @@ pub struct EvaluationCache<'tcx> {
|
|||
>,
|
||||
}
|
||||
|
||||
impl<'tcx> EvaluationCache<'tcx> {
|
||||
/// Actually frees the underlying memory in contrast to what stdlib containers do on `clear`
|
||||
pub fn clear(&self) {
|
||||
*self.hashmap.borrow_mut() = Default::default();
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Eq, PartialEq)]
|
||||
pub struct WithDepNode<T> {
|
||||
dep_node: DepNodeIndex,
|
||||
|
|
Loading…
Reference in New Issue