From faf90351b79de04de0176b1e0de07cc5f1730eaa Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Sun, 16 Jul 2017 11:43:24 -0700 Subject: 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. --- src/libsyntax/parse/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax') 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); } -- cgit 1.4.1-3-g733a5