diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-07 19:30:59 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-07 19:30:59 +1100 |
| commit | 6889fe3806fa44addca89193e5c45ced8c7f532d (patch) | |
| tree | 73ee1b597d6099e7af1af7ac7a6603c6c0b94b8a | |
| parent | 97c157fe1e52eeabe14a64865b4731794a23393a (diff) | |
| download | rust-6889fe3806fa44addca89193e5c45ced8c7f532d.tar.gz rust-6889fe3806fa44addca89193e5c45ced8c7f532d.zip | |
Rename `unchecked_claim_error_was_emitted` as `unchecked_error_guaranteed`.
It's more to-the-point.
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 74cccda6cbf..ec5029e505f 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -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() }) } @@ -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() }) } @@ -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() }) } @@ -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(); @@ -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()); } }); diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 1a1e1de6734..bcf04a71ae2 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -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(()) } } |
