Trim extra whitespace in fn ptr suggestion span
Trim extra whitespace when suggesting removal of invalid qualifiers when parsing function pointer type. Fixes: #133083 Signed-off-by: Tyrone Wu <wudevelops@gmail.com>
This commit is contained in:
parent
f753850659
commit
5082fd8b1e
5 changed files with 96 additions and 52 deletions
|
@ -2830,9 +2830,10 @@ pub(crate) struct DynAfterMut {
|
|||
pub(crate) struct FnPointerCannotBeConst {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect", style = "verbose")]
|
||||
#[label]
|
||||
pub qualifier: Span,
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect", style = "verbose")]
|
||||
pub suggestion: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
@ -2840,9 +2841,10 @@ pub(crate) struct FnPointerCannotBeConst {
|
|||
pub(crate) struct FnPointerCannotBeAsync {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect", style = "verbose")]
|
||||
#[label]
|
||||
pub qualifier: Span,
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect", style = "verbose")]
|
||||
pub suggestion: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue