Skip to content

Commit 6889fe3

Browse files
committed
Rename unchecked_claim_error_was_emitted as unchecked_error_guaranteed.
It's more to-the-point.
1 parent 97c157f commit 6889fe3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/rustc_errors/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ impl DiagCtxt {
933933
self.inner.borrow().has_errors().then(|| {
934934
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
935935
#[allow(deprecated)]
936-
ErrorGuaranteed::unchecked_claim_error_was_emitted()
936+
ErrorGuaranteed::unchecked_error_guaranteed()
937937
})
938938
}
939939

@@ -945,7 +945,7 @@ impl DiagCtxt {
945945
result.then(|| {
946946
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
947947
#[allow(deprecated)]
948-
ErrorGuaranteed::unchecked_claim_error_was_emitted()
948+
ErrorGuaranteed::unchecked_error_guaranteed()
949949
})
950950
}
951951

@@ -958,7 +958,7 @@ impl DiagCtxt {
958958
result.then(|| {
959959
// FIXME(nnethercote) find a way to store an `ErrorGuaranteed`.
960960
#[allow(deprecated)]
961-
ErrorGuaranteed::unchecked_claim_error_was_emitted()
961+
ErrorGuaranteed::unchecked_error_guaranteed()
962962
})
963963
}
964964

@@ -1286,7 +1286,7 @@ impl DiagCtxtInner {
12861286
let backtrace = std::backtrace::Backtrace::capture();
12871287
self.delayed_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
12881288
#[allow(deprecated)]
1289-
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
1289+
return Some(ErrorGuaranteed::unchecked_error_guaranteed());
12901290
}
12911291
GoodPathDelayedBug => {
12921292
let backtrace = std::backtrace::Backtrace::capture();
@@ -1369,7 +1369,7 @@ impl DiagCtxtInner {
13691369

13701370
#[allow(deprecated)]
13711371
if level == Level::Error {
1372-
guaranteed = Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
1372+
guaranteed = Some(ErrorGuaranteed::unchecked_error_guaranteed());
13731373
}
13741374
});
13751375

compiler/rustc_span/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2479,7 +2479,7 @@ pub struct ErrorGuaranteed(());
24792479
impl ErrorGuaranteed {
24802480
/// Don't use this outside of `DiagCtxtInner::emit_diagnostic`!
24812481
#[deprecated = "should only be used in `DiagCtxtInner::emit_diagnostic`"]
2482-
pub fn unchecked_claim_error_was_emitted() -> Self {
2482+
pub fn unchecked_error_guaranteed() -> Self {
24832483
ErrorGuaranteed(())
24842484
}
24852485
}

0 commit comments

Comments
 (0)