Mark ErrorGuaranteed
constructor as deprecated so people don't use it
This commit is contained in:
parent
82cd953c7c
commit
6077fdd219
6 changed files with 35 additions and 16 deletions
|
@ -1178,6 +1178,7 @@ fn extra_compiler_flags() -> Option<(Vec<String>, bool)> {
|
|||
pub fn catch_fatal_errors<F: FnOnce() -> R, R>(f: F) -> Result<R, ErrorGuaranteed> {
|
||||
catch_unwind(panic::AssertUnwindSafe(f)).map_err(|value| {
|
||||
if value.is::<rustc_errors::FatalErrorMarker>() {
|
||||
#[allow(deprecated)]
|
||||
ErrorGuaranteed::unchecked_claim_error_was_emitted()
|
||||
} else {
|
||||
panic::resume_unwind(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue