Skip to content

Commit 32c8986

Browse files
committed
Remove Cache::clear.
It's unused. And it's nice to remove this function that didn't behave like normal `clear` does, as the comment explained.
1 parent 9d9b6e8 commit 32c8986

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

compiler/rustc_query_system/src/cache.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ impl<Key, Value> Default for Cache<Key, Value> {
2323
}
2424
}
2525

26-
impl<Key, Value> Cache<Key, Value> {
27-
/// Actually frees the underlying memory in contrast to what stdlib containers do on `clear`
28-
pub fn clear(&self) {
29-
*self.hashmap.borrow_mut() = Default::default();
30-
}
31-
}
32-
3326
impl<Key: Eq + Hash, Value: Clone> Cache<Key, Value> {
3427
pub fn get<Tcx: DepContext>(&self, key: &Key, tcx: Tcx) -> Option<Value> {
3528
Some(self.hashmap.borrow().get(key)?.get(tcx))

0 commit comments

Comments
 (0)