File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1- 562dee4820c458d823175268e41601d4c060588a
1+ 9602bda1dd0c1bbf5787e398385bbac81fd532f8
Original file line number Diff line number Diff line change @@ -479,11 +479,11 @@ respect to incremental compilation:
479479 and the projection queries act as a "firewall", shielding their dependents
480480 from the unconditionally red ` no_hash ` node.
481481
482- - ` cache_on_disk_if ` - This attribute is what determines which query results
483- are persisted in the incremental compilation query result cache .
484- The attribute takes an expression that allows per query invocation decisions.
485- For example, it makes no sense to store values from upstream
486- crates in the cache because they are already available in the upstream crate's metadata.
482+ - ` cache_on_disk ` - The query's return values are cached to disk, and can be
483+ loaded by subsequent sessions if the corresponding dep node is green .
484+ If the ` separate_provide_extern ` modifier is also present, values will only
485+ be cached to disk for "local" keys, because values for external crates should
486+ be loadable from crate metadata instead .
487487
488488[ mod ] : ../query.html#adding-a-new-kind-of-query
489489
Original file line number Diff line number Diff line change @@ -275,8 +275,9 @@ This looks something like:
275275rustc_queries! {
276276 /// Records the type of every item.
277277 query type_of(key: DefId) -> Ty<'tcx> {
278- cache_on_disk_if { key.is_local() }
279278 desc { |tcx| "computing the type of `{}`", tcx.def_path_str(key) }
279+ cache_on_disk
280+ separate_provide_extern
280281 }
281282 ...
282283}
You can’t perform that action at this time.
0 commit comments