Fix diagnostic struct typo, make sure is_array_like_block checks that it's a block
This commit is contained in:
parent
2947be7af8
commit
f90f43d62b
4 changed files with 46 additions and 8 deletions
|
@ -810,16 +810,16 @@ pub(crate) enum WrapInParentheses {
|
|||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_array_brackets_instead_of_braces)]
|
||||
pub(crate) struct ArrayBracketsInsteadOfSpaces {
|
||||
pub(crate) struct ArrayBracketsInsteadOfBraces {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[subdiagnostic]
|
||||
pub sub: ArrayBracketsInsteadOfSpacesSugg,
|
||||
pub sub: ArrayBracketsInsteadOfBracesSugg,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
#[multipart_suggestion(parse_suggestion, applicability = "maybe-incorrect")]
|
||||
pub(crate) struct ArrayBracketsInsteadOfSpacesSugg {
|
||||
pub(crate) struct ArrayBracketsInsteadOfBracesSugg {
|
||||
#[suggestion_part(code = "[")]
|
||||
pub left: Span,
|
||||
#[suggestion_part(code = "]")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue