Rollup merge of #98428 - davidtwco:translation-derive-typed-identifiers, r=oli-obk
macros: use typed identifiers in diag and subdiag derive Using typed identifiers instead of strings with the Fluent identifiers in the diagnostic and subdiagnostic derives - this enables the diagnostic derive to benefit from the compile-time validation that comes with typed identifiers, namely that use of a non-existent Fluent identifier will not compile. r? `````@oli-obk`````
This commit is contained in:
commit
0b3b4ef2b5
15 changed files with 1003 additions and 701 deletions
|
@ -36,7 +36,7 @@ pub fn expand_cfg(
|
|||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[error(slug = "builtin-macros-requires-cfg-pattern")]
|
||||
#[error(builtin_macros::requires_cfg_pattern)]
|
||||
struct RequiresCfgPattern {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
|
@ -44,7 +44,7 @@ struct RequiresCfgPattern {
|
|||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[error(slug = "builtin-macros-expected-one-cfg-pattern")]
|
||||
#[error(builtin_macros::expected_one_cfg_pattern)]
|
||||
struct OneCfgPattern {
|
||||
#[primary_span]
|
||||
span: Span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue