@@ -23,11 +23,10 @@ pub struct SuggestionsDisabled;
2323/// Simplified version of `FluentArg` that can implement `Encodable` and `Decodable`. Collection of
2424/// `DiagnosticArg` are converted to `FluentArgs` (consuming the collection) at the start of
2525/// diagnostic emission.
26- pub type DiagnosticArg < ' iter , ' source > =
27- ( & ' iter DiagnosticArgName < ' source > , & ' iter DiagnosticArgValue ) ;
26+ pub type DiagnosticArg < ' iter , ' source > = ( & ' iter DiagnosticArgName , & ' iter DiagnosticArgValue ) ;
2827
2928/// Name of a diagnostic argument.
30- pub type DiagnosticArgName < ' source > = Cow < ' source , str > ;
29+ pub type DiagnosticArgName = Cow < ' static , str > ;
3130
3231/// Simplified version of `FluentValue` that can implement `Encodable` and `Decodable`. Converted
3332/// to a `FluentValue` by the emitter to be used in diagnostic translation.
@@ -103,7 +102,7 @@ pub struct Diagnostic {
103102 pub span : MultiSpan ,
104103 pub children : Vec < SubDiagnostic > ,
105104 pub suggestions : Result < Vec < CodeSuggestion > , SuggestionsDisabled > ,
106- args : FxHashMap < DiagnosticArgName < ' static > , DiagnosticArgValue > ,
105+ args : FxHashMap < DiagnosticArgName , DiagnosticArgValue > ,
107106
108107 /// This is not used for highlighting or rendering any error message. Rather, it can be used
109108 /// as a sort key to sort a buffer of diagnostics. By default, it is the primary span of
@@ -923,10 +922,7 @@ impl Diagnostic {
923922 self
924923 }
925924
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 > ) {
930926 self . args = args;
931927 }
932928
0 commit comments