about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-07-16 11:43:24 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-07-17 09:27:51 -0700
commitfaf90351b79de04de0176b1e0de07cc5f1730eaa (patch)
tree56e8a580fc683a21d2b6e623af9758e0b36b250c /src/libsyntax/parse
parent7239d7717188f6dc2b380a40335a0c8571be6502 (diff)
downloadrust-faf90351b79de04de0176b1e0de07cc5f1730eaa.tar.gz
rust-faf90351b79de04de0176b1e0de07cc5f1730eaa.zip
Add flag to hide code on inline suggestions
Now there's a way to add suggestions that hide the suggested code when
presented inline, to avoid weird wording when short code snippets are
added at the end.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 1b6c3cf94e4..b3291e9e0b5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2807,9 +2807,9 @@ impl<'a> Parser<'a> {
                         let cur_pos = cm.lookup_char_pos(self.span.lo);
                         let op_pos = cm.lookup_char_pos(cur_op_span.hi);
                         if cur_pos.line != op_pos.line {
-                            err.span_suggestion(cur_op_span,
-                                                "did you mean to end the statement here instead?",
-                                                ";".to_string());
+                            err.span_suggestion_short(cur_op_span,
+                                                      "did you mean to use `;` here?",
+                                                      ";".to_string());
                         }
                         return Err(err);
                     }