mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Always cache const eval queries
This commit is contained in:
parent
c160bf3c3e
commit
40629ef827
@ -716,10 +716,7 @@ rustc_queries! {
|
|||||||
"const-evaluating + checking `{}`",
|
"const-evaluating + checking `{}`",
|
||||||
key.value.display(tcx)
|
key.value.display(tcx)
|
||||||
}
|
}
|
||||||
cache_on_disk_if(_, opt_result) {
|
cache_on_disk_if { true }
|
||||||
// Only store results without errors
|
|
||||||
opt_result.map_or(true, |r| r.is_ok())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Evaluates const items or anonymous constants
|
/// Evaluates const items or anonymous constants
|
||||||
@ -734,10 +731,7 @@ rustc_queries! {
|
|||||||
"simplifying constant for the type system `{}`",
|
"simplifying constant for the type system `{}`",
|
||||||
key.value.display(tcx)
|
key.value.display(tcx)
|
||||||
}
|
}
|
||||||
cache_on_disk_if(_, opt_result) {
|
cache_on_disk_if { true }
|
||||||
// Only store results without errors
|
|
||||||
opt_result.map_or(true, |r| r.is_ok())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Destructure a constant ADT or array into its variant index and its
|
/// Destructure a constant ADT or array into its variant index and its
|
||||||
|
Loading…
Reference in New Issue
Block a user