1
Fork 0

Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors

Cleanup errors handlers even more

A sequel to #118587.

r? `@compiler-errors`
This commit is contained in:
Jubilee 2023-12-14 16:07:48 -08:00 committed by GitHub
commit 9e872b7cd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 117 additions and 113 deletions

View file

@ -65,7 +65,7 @@ pub(crate) struct RequiresUnsafe {
impl<'sess> IntoDiagnostic<'sess> for RequiresUnsafe {
#[track_caller]
fn into_diagnostic(self, handler: &'sess Handler) -> DiagnosticBuilder<'sess, ErrorGuaranteed> {
let mut diag = handler.struct_diagnostic(fluent::mir_transform_requires_unsafe);
let mut diag = handler.struct_err(fluent::mir_transform_requires_unsafe);
diag.code(rustc_errors::DiagnosticId::Error("E0133".to_string()));
diag.set_span(self.span);
diag.span_label(self.span, self.details.label());