@@ -1262,21 +1262,28 @@ impl<'a, G: EmissionGuarantee> IntoDiagnostic<'a, G> for ExpectedSemi {
1262
1262
let token_descr = TokenDescription :: from_token ( & self . token ) ;
1263
1263
1264
1264
let mut diag = handler. struct_diagnostic ( match token_descr {
1265
- Some ( TokenDescription :: ReservedIdentifier ) => {
1266
- fluent:: parse_expected_semi_found_reserved_identifier_str
1265
+ Some ( TokenDescription :: ReservedIdentifier ) => DiagnosticMessage :: Str ( Cow :: from (
1266
+ "expected `;`, found reserved identifier `{$token}`" ,
1267
+ ) ) ,
1268
+ Some ( TokenDescription :: Keyword ) => {
1269
+ DiagnosticMessage :: Str ( Cow :: from ( "expected `;`, found keyword `{$token}`" ) )
1267
1270
}
1268
- Some ( TokenDescription :: Keyword ) => fluent:: parse_expected_semi_found_keyword_str,
1269
1271
Some ( TokenDescription :: ReservedKeyword ) => {
1270
- fluent:: parse_expected_semi_found_reserved_keyword_str
1272
+ DiagnosticMessage :: Str ( Cow :: from ( "expected `;`, found reserved keyword `{$token}`" ) )
1273
+ }
1274
+ Some ( TokenDescription :: DocComment ) => {
1275
+ DiagnosticMessage :: Str ( Cow :: from ( "expected `;`, found doc comment `{$token}`" ) )
1271
1276
}
1272
- Some ( TokenDescription :: DocComment ) => fluent:: parse_expected_semi_found_doc_comment_str,
1273
- None => fluent:: parse_expected_semi_found_str,
1277
+ None => DiagnosticMessage :: Str ( Cow :: from ( "expected `;`, found `{$token}`" ) ) ,
1274
1278
} ) ;
1275
1279
diag. set_span ( self . span ) ;
1276
1280
diag. set_arg ( "token" , self . token ) ;
1277
1281
1278
1282
if let Some ( unexpected_token_label) = self . unexpected_token_label {
1279
- diag. span_label ( unexpected_token_label, fluent:: parse_label_unexpected_token) ;
1283
+ diag. span_label (
1284
+ unexpected_token_label,
1285
+ DiagnosticMessage :: Str ( Cow :: from ( "unexpected token" ) ) ,
1286
+ ) ;
1280
1287
}
1281
1288
1282
1289
self . sugg . add_to_diagnostic ( & mut diag) ;
0 commit comments