diff options
| author | David Wood <david.wood@huawei.com> | 2022-06-23 14:51:44 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-06-24 09:08:25 +0100 |
| commit | 99bc97940314176bc6ed38cea11723cc1fd9ee3b (patch) | |
| tree | 26bc8329607a52e1ba23732424c0673844b29012 /compiler/rustc_builtin_macros/src | |
| parent | fc96600bf6a52f92aeeee60a92a161a82b61c0ef (diff) | |
| download | rust-99bc97940314176bc6ed38cea11723cc1fd9ee3b.tar.gz rust-99bc97940314176bc6ed38cea11723cc1fd9ee3b.zip | |
macros: use typed identifiers in diag derive
Using typed identifiers instead of strings with the Fluent identifier enables the diagnostic derive to benefit from the compile-time validation that comes with typed identifiers - use of a non-existent Fluent identifier will not compile. Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/cfg.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/cfg.rs b/compiler/rustc_builtin_macros/src/cfg.rs index c75d83bd0a0..aa355150b4f 100644 --- a/compiler/rustc_builtin_macros/src/cfg.rs +++ b/compiler/rustc_builtin_macros/src/cfg.rs @@ -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, |
