mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Auto merge of #111026 - compiler-errors:only-typeck-root, r=cjgillot
Only cache typeck results if it's the typeck root context: https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/incr_comp_query_cache_promotion.20taking.20forever Basically, typeck children just copy the typeck results of their typeck root item, so caching their results means copying the same typeck results for each child item. r? `@ghost`
This commit is contained in:
commit
4b87ed9d0f
@ -875,7 +875,7 @@ rustc_queries! {
|
||||
|
||||
query typeck(key: LocalDefId) -> &'tcx ty::TypeckResults<'tcx> {
|
||||
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key) }
|
||||
cache_on_disk_if { true }
|
||||
cache_on_disk_if(tcx) { !tcx.is_typeck_child(key.to_def_id()) }
|
||||
}
|
||||
query diagnostic_only_typeck(key: LocalDefId) -> &'tcx ty::TypeckResults<'tcx> {
|
||||
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key) }
|
||||
|
Loading…
Reference in New Issue
Block a user