From 037718f6b6f0f85503c3b98e29243af41f0f15dc Mon Sep 17 00:00:00 2001 From: nils <48135649+Nilstrieb@users.noreply.github.com> Date: Fri, 21 Oct 2022 13:53:43 +0200 Subject: [PATCH] Update diagnostics migration blog post to use new flat slugs --- posts/inside-rust/2022-08-16-diagnostic-effort.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/posts/inside-rust/2022-08-16-diagnostic-effort.md b/posts/inside-rust/2022-08-16-diagnostic-effort.md index 10dc19245..69a0cf8e0 100644 --- a/posts/inside-rust/2022-08-16-diagnostic-effort.md +++ b/posts/inside-rust/2022-08-16-diagnostic-effort.md @@ -161,7 +161,7 @@ primary `Span` (that was given to `struct_span_err`). ```rust #[derive(SessionDiagnostic)] -#[error(parser::return_type_arrow)] +#[error(parser_return_type_arrow)] struct ReturnTypeArrow { #[primary_span] span: Span, @@ -177,7 +177,7 @@ Finally, we need to add any labels, notes, helps or suggestions: ```rust #[derive(SessionDiagnostic)] -#[error(parser::return_type_arrow)] +#[error(parser_return_type_arrow)] struct ReturnTypeArrow { #[primary_span] #[suggestion(applicability = "machine-applicable", code = "->")] @@ -212,11 +212,11 @@ impl SessionDiagnostic for ReturnTypeArrow { fn into_diagnostic(self, sess: &'_ rustc_session::Session) -> DiagnosticBuilder<'_> { sess.struct_span_err( self.span, - fluent::parser::return_type_arrow, + fluent::parser_return_type_arrow, ) .span_suggestion_short( self.span, - fluent::parser::suggestion, + fluent::suggestion, "->".to_string(), Applicability::MachineApplicable, )