rename is_tainted_by_errors
This commit is contained in:
parent
3fca95a597
commit
1c48039a87
13 changed files with 42 additions and 33 deletions
|
@ -2294,9 +2294,13 @@ mod error {
|
|||
}
|
||||
|
||||
pub fn buffer_error(&mut self, t: DiagnosticBuilder<'_, ErrorGuaranteed>) {
|
||||
self.tainted_by_errors = Some(
|
||||
self.tcx.sess.delay_span_bug(t.span.clone(), "diagnostic buffered but not emitted"),
|
||||
);
|
||||
if let None = self.tainted_by_errors {
|
||||
self.tainted_by_errors = Some(
|
||||
self.tcx
|
||||
.sess
|
||||
.delay_span_bug(t.span.clone(), "diagnostic buffered but not emitted"),
|
||||
)
|
||||
}
|
||||
t.buffer(&mut self.buffered);
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
|||
instantiated_ty: OpaqueHiddenType<'tcx>,
|
||||
origin: OpaqueTyOrigin,
|
||||
) -> Ty<'tcx> {
|
||||
if let Some(e) = self.is_tainted_by_errors() {
|
||||
if let Some(e) = self.tainted_by_errors() {
|
||||
return self.tcx.ty_error_with_guaranteed(e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue