diff options
| author | Tyrone Wu <wudevelops@gmail.com> | 2024-11-17 21:02:05 +0000 |
|---|---|---|
| committer | Tyrone Wu <wudevelops@gmail.com> | 2025-01-27 17:17:22 +0000 |
| commit | 5082fd8b1ee31284be473fe4e8691677ff61c708 (patch) | |
| tree | b9035a7d6a70c9e9c330e3ed6bc395c71ae27496 /compiler/rustc_parse/src/errors.rs | |
| parent | f753850659bdf5788332525f3fe395685929c682 (diff) | |
| download | rust-5082fd8b1ee31284be473fe4e8691677ff61c708.tar.gz rust-5082fd8b1ee31284be473fe4e8691677ff61c708.zip | |
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>
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index f78d9dc2bfc..3d07166274d 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -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)] |
