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/diagnostic.rs | |
| parent | 19b348fed44342d8addbbb5e8f67cda5dc8d9b95 (diff) | |
| download | rust-191fac68266b73158ff048c83556ea91cbf977fd.tar.gz rust-191fac68266b73158ff048c83556ea91cbf977fd.zip | |
UPDATE - rename AddSubdiagnostic trait to AddToDiagnostic
Diffstat (limited to 'compiler/rustc_errors/src/diagnostic.rs')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 4 |
1 files changed, 2 insertions, 2 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 } |
