Skip to content

Commit 05fe89d

Browse files
committed
experiment query caching
1 parent 90efac0 commit 05fe89d

File tree

2 files changed

+3
-2
lines changed
  • compiler
    • rustc_ast_pretty/src/pprust/state
    • rustc_middle/src/query

2 files changed

+3
-2
lines changed

compiler/rustc_ast_pretty/src/pprust/state/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use ast::StaticItem;
22
use itertools::{Itertools, Position};
3-
use rustc_ast::{self as ast, EiiImpl, ModKind, ModKind, Safety, TraitAlias};
3+
use rustc_ast::{self as ast, EiiImpl, ModKind, Safety, TraitAlias};
44
use rustc_span::Ident;
55

66
use crate::pp::BoxMarker;

compiler/rustc_middle/src/query/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2746,9 +2746,10 @@ rustc_queries! {
27462746
}
27472747

27482748
/// Returns a list of all `externally implementable items` crate.
2749-
query externally_implementable_items(_: CrateNum) -> &'tcx FxIndexMap<DefId, (EiiDecl, FxIndexMap<DefId, EiiImpl>)> {
2749+
query externally_implementable_items(cnum: CrateNum) -> &'tcx FxIndexMap<DefId, (EiiDecl, FxIndexMap<DefId, EiiImpl>)> {
27502750
arena_cache
27512751
desc { "looking up the externally implementable items of a crate" }
2752+
cache_on_disk_if { *cnum == LOCAL_CRATE }
27522753
separate_provide_extern
27532754
}
27542755
}

0 commit comments

Comments
 (0)