diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 16:18:19 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-05 12:14:49 +1100 |
| commit | 573267cf3c10c13f4cb3b9935affd05925d938d0 (patch) | |
| tree | ce60e5aa75d4f6074bfe1ed890fec5a1185176ec /compiler/rustc_errors/src | |
| parent | 60ea6e2831952110b81fd76190ee66a2f094febd (diff) | |
| download | rust-573267cf3c10c13f4cb3b9935affd05925d938d0.tar.gz rust-573267cf3c10c13f4cb3b9935affd05925d938d0.zip | |
Rename `SubdiagnosticMessageOp` as `SubdiagMessageOp`.
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_impls.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 6db305c43d1..9d73d4edb7d 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -182,14 +182,14 @@ where /// Add a subdiagnostic to an existing diagnostic where `f` is invoked on every message used /// (to optionally perform eager translation). - fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagnosticMessageOp<G>>( + fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>( self, diag: &mut Diag<'_, G>, f: F, ); } -pub trait SubdiagnosticMessageOp<G> = Fn(&mut Diag<'_, G>, SubdiagMessage) -> SubdiagMessage; +pub trait SubdiagMessageOp<G> = Fn(&mut Diag<'_, G>, SubdiagMessage) -> SubdiagMessage; /// Trait implemented by lint types. This should not be implemented manually. Instead, use /// `#[derive(LintDiagnostic)]` -- see [rustc_macros::LintDiagnostic]. diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs index 70c8d971868..839bd65e4a6 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -2,7 +2,7 @@ use crate::diagnostic::DiagLocation; use crate::{fluent_generated as fluent, AddToDiagnostic}; use crate::{ Diag, DiagArgValue, DiagCtxt, EmissionGuarantee, ErrCode, IntoDiagnostic, IntoDiagnosticArg, - Level, SubdiagnosticMessageOp, + Level, SubdiagMessageOp, }; use rustc_ast as ast; use rustc_ast_pretty::pprust; @@ -298,7 +298,7 @@ pub struct SingleLabelManySpans { pub label: &'static str, } impl AddToDiagnostic for SingleLabelManySpans { - fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagnosticMessageOp<G>>( + fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>( self, diag: &mut Diag<'_, G>, _: F, diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 79d81dfaf50..0a6d66f52da 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -39,7 +39,7 @@ pub use codes::*; pub use diagnostic::{ AddToDiagnostic, BugAbort, DecorateLint, Diag, DiagArg, DiagArgMap, DiagArgName, DiagArgValue, DiagInner, DiagStyledString, EmissionGuarantee, FatalAbort, IntoDiagnostic, IntoDiagnosticArg, - StringPart, Subdiag, SubdiagnosticMessageOp, + StringPart, Subdiag, SubdiagMessageOp, }; pub use diagnostic_impls::{ DiagArgFromDisplay, DiagSymbolList, ExpectedLifetimeParameter, IndicateAnonymousLifetime, |
