diff options
| author | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-09-18 11:46:16 -0400 |
|---|---|---|
| committer | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-09-21 11:39:53 -0400 |
| commit | 191fac68266b73158ff048c83556ea91cbf977fd (patch) | |
| tree | 5e744529ae1f878b19d5991e43e44a6bc6098ed9 /compiler/rustc_errors/src | |
| parent | 19b348fed44342d8addbbb5e8f67cda5dc8d9b95 (diff) | |
| download | rust-191fac68266b73158ff048c83556ea91cbf977fd.tar.gz rust-191fac68266b73158ff048c83556ea91cbf977fd.zip | |
UPDATE - rename AddSubdiagnostic trait to AddToDiagnostic
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_builder.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 8a56068fcc7..d3a263ac56d 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -178,7 +178,7 @@ impl IntoDiagnosticArg for hir::ConstContext { /// Trait implemented by error types. This should not be implemented manually. Instead, use /// `#[derive(SessionSubdiagnostic)]` -- see [rustc_macros::SessionSubdiagnostic]. #[rustc_diagnostic_item = "AddSubdiagnostic"] -pub trait AddSubdiagnostic { +pub trait AddToDiagnostic { /// Add a subdiagnostic to an existing diagnostic. fn add_to_diagnostic(self, diag: &mut Diagnostic); } @@ -893,7 +893,7 @@ impl Diagnostic { /// Add a subdiagnostic from a type that implements `SessionSubdiagnostic` - see /// [rustc_macros::SessionSubdiagnostic]. - pub fn subdiagnostic(&mut self, subdiagnostic: impl AddSubdiagnostic) -> &mut Self { + pub fn subdiagnostic(&mut self, subdiagnostic: impl AddToDiagnostic) -> &mut Self { subdiagnostic.add_to_diagnostic(self); self } diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index b646dd662cb..209a50fd306 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -580,7 +580,7 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> { forward!(pub fn subdiagnostic( &mut self, - subdiagnostic: impl crate::AddSubdiagnostic + subdiagnostic: impl crate::AddToDiagnostic ) -> &mut Self); } diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index aed52bce9aa..19cae2c9077 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -371,7 +371,7 @@ impl fmt::Display for ExplicitBug { impl error::Error for ExplicitBug {} pub use diagnostic::{ - AddSubdiagnostic, DecorateLint, Diagnostic, DiagnosticArg, DiagnosticArgFromDisplay, + AddToDiagnostic, DecorateLint, Diagnostic, DiagnosticArg, DiagnosticArgFromDisplay, DiagnosticArgValue, DiagnosticId, DiagnosticStyledString, IntoDiagnosticArg, SubDiagnostic, }; pub use diagnostic_builder::{DiagnosticBuilder, EmissionGuarantee, LintDiagnosticBuilder}; |
