Pass ErrorGuaranteed to cycle error
This commit is contained in:
parent
668bf8c593
commit
e7b3c94b0e
7 changed files with 59 additions and 24 deletions
|
@ -8,6 +8,7 @@ use crate::query::DepNodeIndex;
|
|||
use crate::query::{QueryContext, QueryInfo, QueryState};
|
||||
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_span::ErrorGuaranteed;
|
||||
use std::fmt::Debug;
|
||||
use std::hash::Hash;
|
||||
|
||||
|
@ -57,6 +58,7 @@ pub trait QueryConfig<Qcx: QueryContext>: Copy {
|
|||
self,
|
||||
tcx: Qcx::DepContext,
|
||||
cycle: &[QueryInfo<Qcx::DepKind>],
|
||||
guar: ErrorGuaranteed,
|
||||
) -> Self::Value;
|
||||
|
||||
fn anon(self) -> bool;
|
||||
|
|
|
@ -148,8 +148,8 @@ where
|
|||
use HandleCycleError::*;
|
||||
match query.handle_cycle_error() {
|
||||
Error => {
|
||||
error.emit();
|
||||
query.value_from_cycle_error(*qcx.dep_context(), &cycle_error.cycle)
|
||||
let guar = error.emit();
|
||||
query.value_from_cycle_error(*qcx.dep_context(), &cycle_error.cycle, guar)
|
||||
}
|
||||
Fatal => {
|
||||
error.emit();
|
||||
|
@ -157,8 +157,8 @@ where
|
|||
unreachable!()
|
||||
}
|
||||
DelayBug => {
|
||||
error.delay_as_bug();
|
||||
query.value_from_cycle_error(*qcx.dep_context(), &cycle_error.cycle)
|
||||
let guar = error.delay_as_bug();
|
||||
query.value_from_cycle_error(*qcx.dep_context(), &cycle_error.cycle, guar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue