diff options
| author | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-09-18 11:45:41 -0400 |
|---|---|---|
| committer | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-09-21 11:39:52 -0400 |
| commit | 19b348fed44342d8addbbb5e8f67cda5dc8d9b95 (patch) | |
| tree | 08bc0d9e7f50ba3a3eb8f227ce9f1e82904a6cb5 /compiler/rustc_session/src/parse.rs | |
| parent | 5b8152807cae152d5c7cfb40615e5a817a6cf750 (diff) | |
| download | rust-19b348fed44342d8addbbb5e8f67cda5dc8d9b95.tar.gz rust-19b348fed44342d8addbbb5e8f67cda5dc8d9b95.zip | |
UPDATE - rename DiagnosticHandler trait to IntoDiagnostic
Diffstat (limited to 'compiler/rustc_session/src/parse.rs')
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index 564629a6703..3189dcb08ad 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -11,8 +11,8 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet}; use rustc_data_structures::sync::{Lock, Lrc}; use rustc_errors::{emitter::SilentEmitter, ColorConfig, Handler}; use rustc_errors::{ - fallback_fluent_bundle, Applicability, Diagnostic, DiagnosticBuilder, DiagnosticId, - DiagnosticMessage, EmissionGuarantee, ErrorGuaranteed, MultiSpan, SessionDiagnostic, StashKey, + fallback_fluent_bundle, Applicability, Diagnostic, DiagnosticBuilder, IntoDiagnostic, + DiagnosticId, DiagnosticMessage, EmissionGuarantee, ErrorGuaranteed, MultiSpan, StashKey, }; use rustc_feature::{find_feature_issue, GateIssue, UnstableFeatures}; use rustc_span::edition::Edition; @@ -344,34 +344,34 @@ impl ParseSess { pub fn create_err<'a>( &'a self, - err: impl SessionDiagnostic<'a>, + err: impl IntoDiagnostic<'a>, ) -> DiagnosticBuilder<'a, ErrorGuaranteed> { err.into_diagnostic(&self.span_diagnostic) } - pub fn emit_err<'a>(&'a self, err: impl SessionDiagnostic<'a>) -> ErrorGuaranteed { + pub fn emit_err<'a>(&'a self, err: impl IntoDiagnostic<'a>) -> ErrorGuaranteed { self.create_err(err).emit() } pub fn create_warning<'a>( &'a self, - warning: impl SessionDiagnostic<'a, ()>, + warning: impl IntoDiagnostic<'a, ()>, ) -> DiagnosticBuilder<'a, ()> { warning.into_diagnostic(&self.span_diagnostic) } - pub fn emit_warning<'a>(&'a self, warning: impl SessionDiagnostic<'a, ()>) { + pub fn emit_warning<'a>(&'a self, warning: impl IntoDiagnostic<'a, ()>) { self.create_warning(warning).emit() } pub fn create_fatal<'a>( &'a self, - fatal: impl SessionDiagnostic<'a, !>, + fatal: impl IntoDiagnostic<'a, !>, ) -> DiagnosticBuilder<'a, !> { fatal.into_diagnostic(&self.span_diagnostic) } - pub fn emit_fatal<'a>(&'a self, fatal: impl SessionDiagnostic<'a, !>) -> ! { + pub fn emit_fatal<'a>(&'a self, fatal: impl IntoDiagnostic<'a, !>) -> ! { self.create_fatal(fatal).emit() } |
