]> git.lizzy.rs Git - rust.git/commitdiff
Move EvaluationCache::clear.
authorCamille GILLOT <gillot.camille@gmail.com>
Wed, 22 Jan 2020 13:00:55 +0000 (14:00 +0100)
committerCamille GILLOT <gillot.camille@gmail.com>
Wed, 5 Feb 2020 11:43:01 +0000 (12:43 +0100)
src/librustc/traits/select.rs
src/librustc/traits/types/select.rs

index ca4a2aa5935a5f47b5638034cf1085a6264e6362..e4ef68c167f943297e6ed66eefdfeff382bc444e 100644 (file)
@@ -3560,13 +3560,6 @@ pub fn derived_cause(
     }
 }
 
-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)
index 9e5bd4cbb9a053fa8cb8a4a7b44fbc476d668bfd..ac3d0049c0c7c42908e6cff2df5b90e46ea13c50 100644 (file)
@@ -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,