Skip to content

Commit 9ba101f

Browse files
committed
Rename Storage as Cache.
Because `Storage` is a vague name that I've never liked.
1 parent 4499407 commit 9ba101f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

compiler/rustc_middle/src/query/plumbing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ macro_rules! define_callbacks {
427427
erase::erase_val(value)
428428
}
429429

430-
pub type Storage<'tcx> =
430+
pub type Cache<'tcx> =
431431
<Key<'tcx> as $crate::query::QueryKey>::Cache<Erased<Value<'tcx>>>;
432432

433433
// Ensure that keys grow no larger than 88 bytes by accident.
@@ -575,7 +575,7 @@ macro_rules! define_callbacks {
575575
/// Holds a `QueryVTable` for each query.
576576
pub struct QueryVTables<'tcx> {
577577
$(
578-
pub $name: ::rustc_middle::query::plumbing::QueryVTable<'tcx, $name::Storage<'tcx>>,
578+
pub $name: ::rustc_middle::query::plumbing::QueryVTable<'tcx, $name::Cache<'tcx>>,
579579
)*
580580
}
581581

compiler/rustc_query_impl/src/plumbing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ macro_rules! define_queries {
550550
}
551551

552552
pub(crate) fn make_query_vtable<'tcx>(incremental: bool)
553-
-> QueryVTable<'tcx, queries::$name::Storage<'tcx>>
553+
-> QueryVTable<'tcx, queries::$name::Cache<'tcx>>
554554
{
555555
QueryVTable {
556556
name: stringify!($name),
@@ -616,7 +616,7 @@ macro_rules! define_queries {
616616
pub(crate) enum VTableGetter {}
617617

618618
impl<'tcx> GetQueryVTable<'tcx> for VTableGetter {
619-
type Cache = rustc_middle::queries::$name::Storage<'tcx>;
619+
type Cache = rustc_middle::queries::$name::Cache<'tcx>;
620620

621621
#[inline(always)]
622622
fn query_vtable(tcx: TyCtxt<'tcx>) -> &'tcx QueryVTable<'tcx, Self::Cache> {

0 commit comments

Comments
 (0)