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.
This commit is contained in:
parent
f7e3d05aa7
commit
b2a856ea3c
2 changed files with 4 additions and 3 deletions
|
@ -970,11 +970,12 @@ impl Handler {
|
|||
span: impl Into<MultiSpan>,
|
||||
msg: impl Into<DiagnosticMessage>,
|
||||
code: DiagnosticId,
|
||||
) {
|
||||
) -> ErrorGuaranteed {
|
||||
self.emit_diag_at_span(
|
||||
Diagnostic::new_with_code(Error { lint: false }, Some(code), msg),
|
||||
span,
|
||||
);
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue