about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2023-01-30 23:47:10 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2023-02-02 13:18:12 +0000
commit4ab75de934935f59f243ab64a641e28aa89e6fcd (patch)
treefe7cc1e8e0c9235e7452a46165c5b4b14713cc2b /compiler/rustc_parse/src/errors.rs
parenta9985cf172e7cb8ab5c58ce2818752c3572754fc (diff)
downloadrust-4ab75de934935f59f243ab64a641e28aa89e6fcd.tar.gz
rust-4ab75de934935f59f243ab64a641e28aa89e6fcd.zip
Improve diagnostic for missing space in range pattern
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index 145611923ff..dcda518f47c 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -668,13 +668,10 @@ pub(crate) struct InclusiveRangeExtraEquals {
 #[diag(parse_inclusive_range_match_arrow)]
 pub(crate) struct InclusiveRangeMatchArrow {
     #[primary_span]
+    pub arrow: Span,
+    #[label]
     pub span: Span,
-    #[suggestion(
-        suggestion_add_space,
-        style = "verbose",
-        code = " ",
-        applicability = "machine-applicable"
-    )]
+    #[suggestion(style = "verbose", code = " ", applicability = "machine-applicable")]
     pub after_pat: Span,
 }