diff options
| author | The Miri Conjob Bot <miri@cron.bot> | 2023-12-26 05:00:54 +0000 |
|---|---|---|
| committer | The Miri Conjob Bot <miri@cron.bot> | 2023-12-26 05:00:54 +0000 |
| commit | 236ae9905a08ff697ddb35261795ad76a1fd3336 (patch) | |
| tree | 30e459f85746867f972df360431022e4eb4c036e /compiler/rustc_query_system/src | |
| parent | f2407d98de61888e287efc97dbc4104f3581b70d (diff) | |
| parent | 2271c26e4a8e062bb00d709d0ccb5846e0c341b9 (diff) | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_query_system/src')
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/graph.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/ich/impls_syntax.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/query/plumbing.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/values.rs | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 3556a5ec1d1..9b06823dfba 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -818,7 +818,7 @@ impl<D: Deps> DepGraphData<D> { None => {} } - if let None = qcx.dep_context().sess().has_errors_or_span_delayed_bugs() { + if let None = qcx.dep_context().sess().dcx().has_errors_or_span_delayed_bugs() { panic!("try_mark_previous_green() - Forcing the DepNode should have set its color") } diff --git a/compiler/rustc_query_system/src/ich/impls_syntax.rs b/compiler/rustc_query_system/src/ich/impls_syntax.rs index f2387017c82..d170cd36ca6 100644 --- a/compiler/rustc_query_system/src/ich/impls_syntax.rs +++ b/compiler/rustc_query_system/src/ich/impls_syntax.rs @@ -60,8 +60,8 @@ impl<'ctx> rustc_ast::HashStableContext for StableHashingContext<'ctx> { impl<'a> HashStable<StableHashingContext<'a>> for SourceFile { fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) { let SourceFile { - name: _, // We hash the smaller name_hash instead of this - name_hash, + name: _, // We hash the smaller stable_id instead of this + stable_id, cnum, // Do not hash the source as it is not encoded src: _, @@ -75,7 +75,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for SourceFile { ref normalized_pos, } = *self; - name_hash.hash_stable(hcx, hasher); + stable_id.hash_stable(hcx, hasher); src_hash.hash_stable(hcx, hasher); diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs index 3e29574c871..34f2c01f890 100644 --- a/compiler/rustc_query_system/src/query/plumbing.rs +++ b/compiler/rustc_query_system/src/query/plumbing.rs @@ -126,7 +126,7 @@ where } Fatal => { error.emit(); - qcx.dep_context().sess().abort_if_errors(); + qcx.dep_context().sess().dcx().abort_if_errors(); unreachable!() } DelayBug => { @@ -138,7 +138,7 @@ where && let Some(span) = root.query.span { error.stash(span, StashKey::Cycle); - qcx.dep_context().sess().span_delayed_bug(span, "delayed cycle error") + qcx.dep_context().sess().dcx().span_delayed_bug(span, "delayed cycle error") } else { error.emit() }; @@ -421,7 +421,7 @@ where // We have an inconsistency. This can happen if one of the two // results is tainted by errors. In this case, delay a bug to // ensure compilation is doomed. - qcx.dep_context().sess().span_delayed_bug( + qcx.dep_context().sess().dcx().span_delayed_bug( DUMMY_SP, format!( "Computed query value for {:?}({:?}) is inconsistent with fed value,\n\ @@ -705,7 +705,7 @@ fn incremental_verify_ich_failed<Tcx>( let old_in_panic = INSIDE_VERIFY_PANIC.with(|in_panic| in_panic.replace(true)); if old_in_panic { - tcx.sess().emit_err(crate::error::Reentrant); + tcx.sess().dcx().emit_err(crate::error::Reentrant); } else { let run_cmd = if let Some(crate_name) = &tcx.sess().opts.crate_name { format!("`cargo clean -p {crate_name}` or `cargo clean`") @@ -714,7 +714,7 @@ fn incremental_verify_ich_failed<Tcx>( }; let dep_node = tcx.dep_graph().data().unwrap().prev_node_of(prev_index); - tcx.sess().emit_err(crate::error::IncrementCompilation { + tcx.sess().dcx().emit_err(crate::error::IncrementCompilation { run_cmd, dep_node: format!("{dep_node:?}"), }); diff --git a/compiler/rustc_query_system/src/values.rs b/compiler/rustc_query_system/src/values.rs index 8848fda9da3..4f1c182cdb8 100644 --- a/compiler/rustc_query_system/src/values.rs +++ b/compiler/rustc_query_system/src/values.rs @@ -9,7 +9,7 @@ pub trait Value<Tcx: DepContext>: Sized { impl<Tcx: DepContext, T> Value<Tcx> for T { default fn from_cycle_error(tcx: Tcx, cycle: &[QueryInfo], _guar: ErrorGuaranteed) -> T { - tcx.sess().abort_if_errors(); + tcx.sess().dcx().abort_if_errors(); // Ideally we would use `bug!` here. But bug! is only defined in rustc_middle, and it's // non-trivial to define it earlier. panic!( |
