diff options
| author | bors <bors@rust-lang.org> | 2022-11-21 18:36:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-21 18:36:26 +0000 |
| commit | b7bc90fea3b441234a84b49fdafeb75815eebbab (patch) | |
| tree | aba475763a52ff6fcad1c617234288ac9880b8e3 /compiler/rustc_parse/src/parser | |
| parent | 1cbc45942d5c0f6eb5d94e3b10762ba541958035 (diff) | |
| parent | f47abd89877b7cfa84e28465aaf647cd48bbc503 (diff) | |
| download | rust-b7bc90fea3b441234a84b49fdafeb75815eebbab.tar.gz rust-b7bc90fea3b441234a84b49fdafeb75815eebbab.zip | |
Auto merge of #104120 - mejrs:diag, r=davidtwco
Match and enforce crate and slug names Some of these were in the wrong place or had a name that didn't match.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_parse/src/parser/attr.rs b/compiler/rustc_parse/src/parser/attr.rs index 612accf3e3b..fb2cee9e346 100644 --- a/compiler/rustc_parse/src/parser/attr.rs +++ b/compiler/rustc_parse/src/parser/attr.rs @@ -55,7 +55,7 @@ impl<'a> Parser<'a> { let span = self.token.span; let mut err = self.sess.span_diagnostic.struct_span_err_with_code( span, - fluent::parser_inner_doc_comment_not_permitted, + fluent::parse_inner_doc_comment_not_permitted, error_code!(E0753), ); if let Some(replacement_span) = self.annotate_following_item_if_applicable( @@ -200,7 +200,7 @@ impl<'a> Parser<'a> { Some(InnerAttrForbiddenReason::AfterOuterDocComment { prev_doc_comment_span }) => { let mut diag = self.struct_span_err( attr_sp, - fluent::parser_inner_attr_not_permitted_after_outer_doc_comment, + fluent::parse_inner_attr_not_permitted_after_outer_doc_comment, ); diag.span_label(attr_sp, fluent::label_attr) .span_label(prev_doc_comment_span, fluent::label_prev_doc_comment); @@ -209,18 +209,18 @@ impl<'a> Parser<'a> { Some(InnerAttrForbiddenReason::AfterOuterAttribute { prev_outer_attr_sp }) => { let mut diag = self.struct_span_err( attr_sp, - fluent::parser_inner_attr_not_permitted_after_outer_attr, + fluent::parse_inner_attr_not_permitted_after_outer_attr, ); diag.span_label(attr_sp, fluent::label_attr) .span_label(prev_outer_attr_sp, fluent::label_prev_attr); diag } Some(InnerAttrForbiddenReason::InCodeBlock) | None => { - self.struct_span_err(attr_sp, fluent::parser_inner_attr_not_permitted) + self.struct_span_err(attr_sp, fluent::parse_inner_attr_not_permitted) } }; - diag.note(fluent::parser_inner_attr_explanation); + diag.note(fluent::parse_inner_attr_explanation); if self .annotate_following_item_if_applicable( &mut diag, @@ -229,7 +229,7 @@ impl<'a> Parser<'a> { ) .is_some() { - diag.note(fluent::parser_outer_attr_explanation); + diag.note(fluent::parse_outer_attr_explanation); }; diag.emit(); } diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index 2558ac801ad..4c626539238 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -937,7 +937,7 @@ impl<'a> Parser<'a> { if self.eat(&token::Gt) { e.span_suggestion_verbose( binop.span.shrink_to_lo(), - fluent::parser_sugg_turbofish_syntax, + fluent::parse_sugg_turbofish_syntax, "::", Applicability::MaybeIncorrect, ) |
