Rollup merge of #103468 - chenyukang:yukang/fix-103435-extra-parentheses, r=estebank

Fix unused lint and parser caring about spaces to won't produce invalid code

Fixes #103435
This commit is contained in:
Manish Goregaokar 2022-11-11 12:12:29 -05:00 committed by GitHub
commit fd5ff82f28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 149 additions and 20 deletions

View file

@ -1165,10 +1165,12 @@ pub(crate) struct ParenthesesInForHead {
#[derive(Subdiagnostic)]
#[multipart_suggestion(suggestion, applicability = "machine-applicable")]
pub(crate) struct ParenthesesInForHeadSugg {
#[suggestion_part(code = "")]
#[suggestion_part(code = "{left_snippet}")]
pub left: Span,
#[suggestion_part(code = "")]
pub left_snippet: String,
#[suggestion_part(code = "{right_snippet}")]
pub right: Span,
pub right_snippet: String,
}
#[derive(Diagnostic)]