@@ -23,11 +23,10 @@ pub struct SuggestionsDisabled;
23
23
/// Simplified version of `FluentArg` that can implement `Encodable` and `Decodable`. Collection of
24
24
/// `DiagnosticArg` are converted to `FluentArgs` (consuming the collection) at the start of
25
25
/// diagnostic emission.
26
- pub type DiagnosticArg < ' iter , ' source > =
27
- ( & ' iter DiagnosticArgName < ' source > , & ' iter DiagnosticArgValue ) ;
26
+ pub type DiagnosticArg < ' iter , ' source > = ( & ' iter DiagnosticArgName , & ' iter DiagnosticArgValue ) ;
28
27
29
28
/// Name of a diagnostic argument.
30
- pub type DiagnosticArgName < ' source > = Cow < ' source , str > ;
29
+ pub type DiagnosticArgName = Cow < ' static , str > ;
31
30
32
31
/// Simplified version of `FluentValue` that can implement `Encodable` and `Decodable`. Converted
33
32
/// to a `FluentValue` by the emitter to be used in diagnostic translation.
@@ -103,7 +102,7 @@ pub struct Diagnostic {
103
102
pub span : MultiSpan ,
104
103
pub children : Vec < SubDiagnostic > ,
105
104
pub suggestions : Result < Vec < CodeSuggestion > , SuggestionsDisabled > ,
106
- args : FxHashMap < DiagnosticArgName < ' static > , DiagnosticArgValue > ,
105
+ args : FxHashMap < DiagnosticArgName , DiagnosticArgValue > ,
107
106
108
107
/// This is not used for highlighting or rendering any error message. Rather, it can be used
109
108
/// as a sort key to sort a buffer of diagnostics. By default, it is the primary span of
@@ -923,10 +922,7 @@ impl Diagnostic {
923
922
self
924
923
}
925
924
926
- pub fn replace_args (
927
- & mut self ,
928
- args : FxHashMap < DiagnosticArgName < ' static > , DiagnosticArgValue > ,
929
- ) {
925
+ pub fn replace_args ( & mut self , args : FxHashMap < DiagnosticArgName , DiagnosticArgValue > ) {
930
926
self . args = args;
931
927
}
932
928
0 commit comments