Skip to content

Commit 40629ef

Browse files
committed
Always cache const eval queries
1 parent c160bf3 commit 40629ef

File tree

1 file changed

+2
-8
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+2
-8
lines changed

compiler/rustc_middle/src/query/mod.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -716,10 +716,7 @@ rustc_queries! {
716716
"const-evaluating + checking `{}`",
717717
key.value.display(tcx)
718718
}
719-
cache_on_disk_if(_, opt_result) {
720-
// Only store results without errors
721-
opt_result.map_or(true, |r| r.is_ok())
722-
}
719+
cache_on_disk_if { true }
723720
}
724721

725722
/// Evaluates const items or anonymous constants
@@ -734,10 +731,7 @@ rustc_queries! {
734731
"simplifying constant for the type system `{}`",
735732
key.value.display(tcx)
736733
}
737-
cache_on_disk_if(_, opt_result) {
738-
// Only store results without errors
739-
opt_result.map_or(true, |r| r.is_ok())
740-
}
734+
cache_on_disk_if { true }
741735
}
742736

743737
/// Destructure a constant ADT or array into its variant index and its

0 commit comments

Comments
 (0)