mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Inline TyCtxt::load_side_effect into its only caller
This commit is contained in:
@@ -718,7 +718,13 @@ fn encode_side_effect<'tcx>(
|
||||
#[inline]
|
||||
fn force_side_effect<'tcx>(&self, tcx: TyCtxt<'tcx>, prev_index: SerializedDepNodeIndex) {
|
||||
with_deps(TaskDepsRef::Ignore, || {
|
||||
let side_effect = tcx.load_side_effect(prev_index).unwrap();
|
||||
let side_effect = tcx
|
||||
.query_system
|
||||
.on_disk_cache
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.load_side_effect(tcx, prev_index)
|
||||
.unwrap();
|
||||
|
||||
// Use `send_and_color` as `promote_node_and_deps_to_current` expects all
|
||||
// green dependencies. `send_and_color` will also prevent multiple nodes
|
||||
@@ -1549,15 +1555,4 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
fn is_eval_always(self, kind: DepKind) -> bool {
|
||||
self.dep_kind_vtable(kind).is_eval_always
|
||||
}
|
||||
|
||||
// Interactions with on_disk_cache
|
||||
fn load_side_effect(
|
||||
self,
|
||||
prev_dep_node_index: SerializedDepNodeIndex,
|
||||
) -> Option<QuerySideEffect> {
|
||||
self.query_system
|
||||
.on_disk_cache
|
||||
.as_ref()
|
||||
.and_then(|c| c.load_side_effect(self, prev_dep_node_index))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ pub fn serialize(tcx: TyCtxt<'_>, encoder: FileEncoder) -> FileEncodeResult {
|
||||
}
|
||||
|
||||
/// Loads a `QuerySideEffect` created during the previous compilation session.
|
||||
pub fn load_side_effect(
|
||||
pub(crate) fn load_side_effect(
|
||||
&self,
|
||||
tcx: TyCtxt<'_>,
|
||||
dep_node_index: SerializedDepNodeIndex,
|
||||
|
||||
Reference in New Issue
Block a user