Skip to content

Commit

Permalink
Always cache const eval queries
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 24, 2020
1 parent c160bf3 commit 40629ef
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,10 +716,7 @@ rustc_queries! {
"const-evaluating + checking `{}`",
key.value.display(tcx)
}
cache_on_disk_if(_, opt_result) {
// Only store results without errors
opt_result.map_or(true, |r| r.is_ok())
}
cache_on_disk_if { true }
}

/// Evaluates const items or anonymous constants
Expand All @@ -734,10 +731,7 @@ rustc_queries! {
"simplifying constant for the type system `{}`",
key.value.display(tcx)
}
cache_on_disk_if(_, opt_result) {
// Only store results without errors
opt_result.map_or(true, |r| r.is_ok())
}
cache_on_disk_if { true }
}

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

0 comments on commit 40629ef

Please sign in to comment.