diff options
| author | Michael Goulet <michael@errs.io> | 2023-12-05 14:52:44 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-05 14:52:44 -0500 |
| commit | e8133700a2e1ea4ac2f6d40e5820d4cffdf5f0d5 (patch) | |
| tree | dbbacf6d9e16abea9a6fd37b49b82a31dcba96f7 /compiler/rustc_mir_transform | |
| parent | dbcde5717194cf69da909dabf8fff5dbb3634000 (diff) | |
| parent | 7811c976d1a6b014bff0fdada7aaaa1774d31b82 (diff) | |
| download | rust-e8133700a2e1ea4ac2f6d40e5820d4cffdf5f0d5.tar.gz rust-e8133700a2e1ea4ac2f6d40e5820d4cffdf5f0d5.zip | |
Rollup merge of #118587 - nnethercote:cleanup-error-handlers-2, r=compiler-errors
Cleanup error handlers some more A sequel to #118470. r? ```@compiler-errors```
Diffstat (limited to 'compiler/rustc_mir_transform')
| -rw-r--r-- | compiler/rustc_mir_transform/src/errors.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_transform/src/errors.rs b/compiler/rustc_mir_transform/src/errors.rs index 3a5270f105a..2358661738a 100644 --- a/compiler/rustc_mir_transform/src/errors.rs +++ b/compiler/rustc_mir_transform/src/errors.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; use rustc_errors::{ Applicability, DecorateLint, DiagnosticArgValue, DiagnosticBuilder, DiagnosticMessage, - EmissionGuarantee, Handler, IntoDiagnostic, + EmissionGuarantee, ErrorGuaranteed, Handler, IntoDiagnostic, }; use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic}; use rustc_middle::mir::{AssertKind, UnsafetyViolationDetails}; @@ -62,9 +62,9 @@ pub(crate) struct RequiresUnsafe { // so we need to eagerly translate the label here, which isn't supported by the derive API // We could also exhaustively list out the primary messages for all unsafe violations, // but this would result in a lot of duplication. -impl<'sess, G: EmissionGuarantee> IntoDiagnostic<'sess, G> for RequiresUnsafe { +impl<'sess> IntoDiagnostic<'sess> for RequiresUnsafe { #[track_caller] - fn into_diagnostic(self, handler: &'sess Handler) -> DiagnosticBuilder<'sess, G> { + fn into_diagnostic(self, handler: &'sess Handler) -> DiagnosticBuilder<'sess, ErrorGuaranteed> { let mut diag = handler.struct_diagnostic(fluent::mir_transform_requires_unsafe); diag.code(rustc_errors::DiagnosticId::Error("E0133".to_string())); diag.set_span(self.span); |
