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_session/src | |
| 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_session/src')
| -rw-r--r-- | compiler/rustc_session/src/errors.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index 70ee46ea902..72c013eb549 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -3,7 +3,7 @@ use std::num::NonZeroU32; use crate::parse::ParseSess; use rustc_ast::token; use rustc_ast::util::literal::LitError; -use rustc_errors::{error_code, DiagnosticMessage, EmissionGuarantee, IntoDiagnostic, MultiSpan}; +use rustc_errors::{error_code, DiagnosticMessage, ErrorGuaranteed, IntoDiagnostic, MultiSpan}; use rustc_macros::Diagnostic; use rustc_span::{BytePos, Span, Symbol}; use rustc_target::spec::{SplitDebuginfo, StackProtector, TargetTriple}; @@ -13,12 +13,12 @@ pub struct FeatureGateError { pub explain: DiagnosticMessage, } -impl<'a, T: EmissionGuarantee> IntoDiagnostic<'a, T> for FeatureGateError { +impl<'a> IntoDiagnostic<'a> for FeatureGateError { #[track_caller] fn into_diagnostic( self, handler: &'a rustc_errors::Handler, - ) -> rustc_errors::DiagnosticBuilder<'a, T> { + ) -> rustc_errors::DiagnosticBuilder<'a, ErrorGuaranteed> { let mut diag = handler.struct_diagnostic(self.explain); diag.set_span(self.span); diag.code(error_code!(E0658)); diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 57a535d8c10..e9648d0d622 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -461,7 +461,7 @@ impl Session { } #[rustc_lint_diagnostics] pub fn fatal(&self, msg: impl Into<DiagnosticMessage>) -> ! { - self.diagnostic().fatal(msg).raise() + self.diagnostic().fatal(msg) } #[rustc_lint_diagnostics] #[track_caller] |
