diff options
| author | David Wood <david.wood@huawei.com> | 2022-06-23 16:12:52 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-06-24 09:08:25 +0100 |
| commit | abd3467d47ad8f366239100334c31478f075a0de (patch) | |
| tree | ecd4d5078913f402480080b565b59796917f7315 /compiler/rustc_macros/src/diagnostics/mod.rs | |
| parent | 99bc97940314176bc6ed38cea11723cc1fd9ee3b (diff) | |
| download | rust-abd3467d47ad8f366239100334c31478f075a0de.tar.gz rust-abd3467d47ad8f366239100334c31478f075a0de.zip | |
macros: use typed identifiers in subdiag derive
As in the diagnostic derive, using typed identifiers in the subdiagnostic derive improves the diagnostics of using the subdiagnostic derive as Fluent messages will be confirmed to exist at compile-time. Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/mod.rs')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/mod.rs b/compiler/rustc_macros/src/diagnostics/mod.rs index 88182ed5a12..2eee4bfb5dd 100644 --- a/compiler/rustc_macros/src/diagnostics/mod.rs +++ b/compiler/rustc_macros/src/diagnostics/mod.rs @@ -72,12 +72,12 @@ pub fn session_diagnostic_derive(s: Structure<'_>) -> TokenStream { /// ```ignore (rust) /// #[derive(SessionSubdiagnostic)] /// pub enum ExpectedIdentifierLabel<'tcx> { -/// #[label(slug = "parser-expected-identifier")] +/// #[label(parser::expected_identifier)] /// WithoutFound { /// #[primary_span] /// span: Span, /// } -/// #[label(slug = "parser-expected-identifier-found")] +/// #[label(parser::expected_identifier_found)] /// WithFound { /// #[primary_span] /// span: Span, @@ -86,7 +86,7 @@ pub fn session_diagnostic_derive(s: Structure<'_>) -> TokenStream { /// } /// /// #[derive(SessionSubdiagnostic)] -/// #[suggestion_verbose(slug = "parser-raw-identifier")] +/// #[suggestion_verbose(parser::raw_identifier)] /// pub struct RawIdentifierSuggestion<'tcx> { /// #[primary_span] /// span: Span, |
