Only cache typeck results if it's the typeck root
This commit is contained in:
parent
831c9298c8
commit
938e807816
1 changed files with 1 additions and 1 deletions
|
@ -875,7 +875,7 @@ rustc_queries! {
|
||||||
|
|
||||||
query typeck(key: LocalDefId) -> &'tcx ty::TypeckResults<'tcx> {
|
query typeck(key: LocalDefId) -> &'tcx ty::TypeckResults<'tcx> {
|
||||||
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key) }
|
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> {
|
query diagnostic_only_typeck(key: LocalDefId) -> &'tcx ty::TypeckResults<'tcx> {
|
||||||
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key) }
|
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue