1
Fork 0

Rollup merge of #120735 - nnethercote:rm-some-unchecked_claims, r=oli-obk

Remove some `unchecked_claim_error_was_emitted` calls

We want to drive the number of these calls down as much as possible. This PR gets rid of a bunch of them.

r? ``@oli-obk``
This commit is contained in:
Guillaume Boisseau 2024-02-07 18:24:46 +01:00 committed by GitHub
commit cb040f5ded
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 102 additions and 153 deletions

View file

@ -2477,10 +2477,9 @@ where
pub struct ErrorGuaranteed(());
impl ErrorGuaranteed {
/// To be used only if you really know what you are doing... ideally, we would find a way to
/// eliminate all calls to this method.
#[deprecated = "`Session::span_delayed_bug` should be preferred over this function"]
pub fn unchecked_claim_error_was_emitted() -> Self {
/// Don't use this outside of `DiagCtxtInner::emit_diagnostic`!
#[deprecated = "should only be used in `DiagCtxtInner::emit_diagnostic`"]
pub fn unchecked_error_guaranteed() -> Self {
ErrorGuaranteed(())
}
}