Skip to content

Commit

Permalink
Cache better
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Nov 23, 2024
1 parent b0f6698 commit 1b30977
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2313,6 +2313,8 @@ rustc_queries! {
key: (LocalDefId, DefId)
) -> Result<(), ErrorGuaranteed> {
desc { |tcx| "checking assoc item `{}` is compatible with trait definition", tcx.def_path_str(key.0) }
cache_on_disk_if { true }
ensure_forwards_result_if_red
}

query deduced_param_attrs(def_id: DefId) -> &'tcx [ty::DeducedParamAttrs] {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ty_utils/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ fn resolve_associated_item<'tcx>(
if trait_item_id != leaf_def.item.def_id
&& let Some(leaf_def_item) = leaf_def.item.def_id.as_local()
{
tcx.compare_impl_item((leaf_def_item, trait_item_id))?;
tcx.ensure().compare_impl_item((leaf_def_item, trait_item_id))?;
}

Some(ty::Instance::new(leaf_def.item.def_id, args))
Expand Down

0 comments on commit 1b30977

Please sign in to comment.