@@ -38,7 +38,7 @@ pub enum DiagArgValue {
38
38
Str ( Cow < ' static , str > ) ,
39
39
// This gets converted to a `FluentNumber`, which is an `f64`. An `i32`
40
40
// safely fits in an `f64`. Any integers bigger than that will be converted
41
- // to strings in `into_diagnostic_arg ` and stored using the `Str` variant.
41
+ // to strings in `into_diag_arg ` and stored using the `Str` variant.
42
42
Number ( i32 ) ,
43
43
StrListSepByAnd ( Vec < Cow < ' static , str > > ) ,
44
44
}
@@ -148,12 +148,12 @@ where
148
148
/// Implemented as a custom trait rather than `From` so that it is implemented on the type being
149
149
/// converted rather than on `DiagArgValue`, which enables types from other `rustc_*` crates to
150
150
/// implement this.
151
- pub trait IntoDiagnosticArg {
152
- fn into_diagnostic_arg ( self ) -> DiagArgValue ;
151
+ pub trait IntoDiagArg {
152
+ fn into_diag_arg ( self ) -> DiagArgValue ;
153
153
}
154
154
155
- impl IntoDiagnosticArg for DiagArgValue {
156
- fn into_diagnostic_arg ( self ) -> DiagArgValue {
155
+ impl IntoDiagArg for DiagArgValue {
156
+ fn into_diag_arg ( self ) -> DiagArgValue {
157
157
self
158
158
}
159
159
}
@@ -419,8 +419,8 @@ impl DiagInner {
419
419
self . children . push ( sub) ;
420
420
}
421
421
422
- pub ( crate ) fn arg ( & mut self , name : impl Into < DiagArgName > , arg : impl IntoDiagnosticArg ) {
423
- self . args . insert ( name. into ( ) , arg. into_diagnostic_arg ( ) ) ;
422
+ pub ( crate ) fn arg ( & mut self , name : impl Into < DiagArgName > , arg : impl IntoDiagArg ) {
423
+ self . args . insert ( name. into ( ) , arg. into_diag_arg ( ) ) ;
424
424
}
425
425
426
426
/// Fields used for Hash, and PartialEq trait.
@@ -1243,7 +1243,7 @@ impl<'a, G: EmissionGuarantee> Diag<'a, G> {
1243
1243
pub fn arg(
1244
1244
& mut self ,
1245
1245
name: impl Into <DiagArgName >,
1246
- arg: impl IntoDiagnosticArg ,
1246
+ arg: impl IntoDiagArg ,
1247
1247
) -> & mut Self {
1248
1248
self . deref_mut( ) . arg( name, arg) ;
1249
1249
self
0 commit comments