Skip to content

Commit ef7aa68

Browse files
committed
Rename Storage as Cache.
Because `Storage` is a vague name that I've never liked.
1 parent 4b66c54 commit ef7aa68

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
@@ -442,7 +442,7 @@ macro_rules! define_callbacks {
442442
erase::erase_val(value)
443443
}
444444

445-
pub type Storage<'tcx> =
445+
pub type Cache<'tcx> =
446446
<Key<'tcx> as $crate::query::QueryKey>::Cache<Erased<Value<'tcx>>>;
447447

448448
// Ensure that keys grow no larger than 88 bytes by accident.
@@ -590,7 +590,7 @@ macro_rules! define_callbacks {
590590
/// Holds a `QueryVTable` for each query.
591591
pub struct QueryVTables<'tcx> {
592592
$(
593-
pub $name: ::rustc_middle::query::plumbing::QueryVTable<'tcx, $name::Storage<'tcx>>,
593+
pub $name: ::rustc_middle::query::plumbing::QueryVTable<'tcx, $name::Cache<'tcx>>,
594594
)*
595595
}
596596

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)