1
Fork 0

Rename unchecked_claim_error_was_emitted as unchecked_error_guaranteed.

It's more to-the-point.
This commit is contained in:
Nicholas Nethercote 2024-02-07 19:30:59 +11:00
parent 97c157fe1e
commit 6889fe3806
2 changed files with 6 additions and 6 deletions

View file

@ -933,7 +933,7 @@ impl DiagCtxt {
self.inner.borrow().has_errors().then(|| { self.inner.borrow().has_errors().then(|| {
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`. // FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
#[allow(deprecated)] #[allow(deprecated)]
ErrorGuaranteed::unchecked_claim_error_was_emitted() ErrorGuaranteed::unchecked_error_guaranteed()
}) })
} }
@ -945,7 +945,7 @@ impl DiagCtxt {
result.then(|| { result.then(|| {
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`. // FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
#[allow(deprecated)] #[allow(deprecated)]
ErrorGuaranteed::unchecked_claim_error_was_emitted() ErrorGuaranteed::unchecked_error_guaranteed()
}) })
} }
@ -958,7 +958,7 @@ impl DiagCtxt {
result.then(|| { result.then(|| {
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`. // FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
#[allow(deprecated)] #[allow(deprecated)]
ErrorGuaranteed::unchecked_claim_error_was_emitted() ErrorGuaranteed::unchecked_error_guaranteed()
}) })
} }
@ -1286,7 +1286,7 @@ impl DiagCtxtInner {
let backtrace = std::backtrace::Backtrace::capture(); let backtrace = std::backtrace::Backtrace::capture();
self.delayed_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace)); self.delayed_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
#[allow(deprecated)] #[allow(deprecated)]
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted()); return Some(ErrorGuaranteed::unchecked_error_guaranteed());
} }
GoodPathDelayedBug => { GoodPathDelayedBug => {
let backtrace = std::backtrace::Backtrace::capture(); let backtrace = std::backtrace::Backtrace::capture();
@ -1369,7 +1369,7 @@ impl DiagCtxtInner {
#[allow(deprecated)] #[allow(deprecated)]
if level == Level::Error { if level == Level::Error {
guaranteed = Some(ErrorGuaranteed::unchecked_claim_error_was_emitted()); guaranteed = Some(ErrorGuaranteed::unchecked_error_guaranteed());
} }
}); });

View file

@ -2479,7 +2479,7 @@ pub struct ErrorGuaranteed(());
impl ErrorGuaranteed { impl ErrorGuaranteed {
/// Don't use this outside of `DiagCtxtInner::emit_diagnostic`! /// Don't use this outside of `DiagCtxtInner::emit_diagnostic`!
#[deprecated = "should only be used in `DiagCtxtInner::emit_diagnostic`"] #[deprecated = "should only be used in `DiagCtxtInner::emit_diagnostic`"]
pub fn unchecked_claim_error_was_emitted() -> Self { pub fn unchecked_error_guaranteed() -> Self {
ErrorGuaranteed(()) ErrorGuaranteed(())
} }
} }