From b2a856ea3cb0087e52f90a9ac7e4e32f0b52a66e Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 30 Nov 2023 13:57:35 +1100 Subject: Return `ErrorGuaranteed` from `span_err_with_code` methods. `ErrorGuaranteed` should be used for all error methods involving the `Error` level, e.g. as is done for the corresponding `span_err` methods. --- compiler/rustc_session/src/session.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index b20017557bb..8f3c0d76a9a 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -478,7 +478,7 @@ impl Session { sp: S, msg: impl Into, code: DiagnosticId, - ) { + ) -> ErrorGuaranteed { self.diagnostic().span_err_with_code(sp, msg, code) } #[rustc_lint_diagnostics] -- cgit 1.4.1-3-g733a5