Skip to content

Commit 66ff6c3

Browse files
committed
only cache codegen_fn_attrs on disk if its local
1 parent 501067c commit 66ff6c3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ rustc_queries! {
10801080
query codegen_fn_attrs(def_id: DefId) -> CodegenFnAttrs {
10811081
desc { |tcx| "computing codegen attributes of `{}`", tcx.def_path_str(def_id) }
10821082
storage(ArenaCacheSelector<'tcx>)
1083-
cache_on_disk_if { true }
1083+
cache_on_disk_if { def_id.is_local() }
10841084
separate_provide_extern
10851085
}
10861086

compiler/rustc_typeck/src/collect.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2718,6 +2718,7 @@ fn linkage_by_name(tcx: TyCtxt<'_>, def_id: LocalDefId, name: &str) -> Linkage {
27182718
_ => tcx.sess.span_fatal(tcx.def_span(def_id), "invalid linkage specified"),
27192719
}
27202720
}
2721+
27212722
fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: DefId) -> CodegenFnAttrs {
27222723
let did = did.expect_local();
27232724
let attrs = tcx.hir().attrs(tcx.hir().local_def_id_to_hir_id(did));

0 commit comments

Comments
 (0)