about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-30 13:57:35 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-02 08:58:24 +1100
commitb2a856ea3cb0087e52f90a9ac7e4e32f0b52a66e (patch)
tree4ef1ee7123a35f5f44436a62e5a65376a932dc48 /compiler/rustc_session
parentf7e3d05aa7e012402269aa02fd0c628445465b86 (diff)
downloadrust-b2a856ea3cb0087e52f90a9ac7e4e32f0b52a66e.tar.gz
rust-b2a856ea3cb0087e52f90a9ac7e4e32f0b52a66e.zip
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.
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/session.rs2
1 files changed, 1 insertions, 1 deletions
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<DiagnosticMessage>,
         code: DiagnosticId,
-    ) {
+    ) -> ErrorGuaranteed {
         self.diagnostic().span_err_with_code(sp, msg, code)
     }
     #[rustc_lint_diagnostics]