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:
commit
9e872b7cd8
23 changed files with 117 additions and 113 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue