Skip to content

Commit

Permalink
Rename unchecked_claim_error_was_emitted as `unchecked_error_guaran…
Browse files Browse the repository at this point in the history
…teed`.

It's more to-the-point.
  • Loading branch information
nnethercote committed Feb 7, 2024
1 parent 97c157f commit 6889fe3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ impl DiagCtxt {
self.inner.borrow().has_errors().then(|| {
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
#[allow(deprecated)]
ErrorGuaranteed::unchecked_claim_error_was_emitted()
ErrorGuaranteed::unchecked_error_guaranteed()
})
}

Expand All @@ -945,7 +945,7 @@ impl DiagCtxt {
result.then(|| {
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
#[allow(deprecated)]
ErrorGuaranteed::unchecked_claim_error_was_emitted()
ErrorGuaranteed::unchecked_error_guaranteed()
})
}

Expand All @@ -958,7 +958,7 @@ impl DiagCtxt {
result.then(|| {
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
#[allow(deprecated)]
ErrorGuaranteed::unchecked_claim_error_was_emitted()
ErrorGuaranteed::unchecked_error_guaranteed()
})
}

Expand Down Expand Up @@ -1286,7 +1286,7 @@ impl DiagCtxtInner {
let backtrace = std::backtrace::Backtrace::capture();
self.delayed_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
#[allow(deprecated)]
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
return Some(ErrorGuaranteed::unchecked_error_guaranteed());
}
GoodPathDelayedBug => {
let backtrace = std::backtrace::Backtrace::capture();
Expand Down Expand Up @@ -1369,7 +1369,7 @@ impl DiagCtxtInner {

#[allow(deprecated)]
if level == Level::Error {
guaranteed = Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
guaranteed = Some(ErrorGuaranteed::unchecked_error_guaranteed());
}
});

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2479,7 +2479,7 @@ pub struct ErrorGuaranteed(());
impl ErrorGuaranteed {
/// Don't use this outside of `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(())
}
}
Expand Down

0 comments on commit 6889fe3

Please sign in to comment.