diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-06-18 15:20:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-18 15:20:57 -0700 |
| commit | 9ca811772c2fddefeda4567cdfb8c790c94e0085 (patch) | |
| tree | a4ede3c4340f0e6bbe965db8098227aa1c5a2943 /src/librustc_parse | |
| parent | f4b5f581a9c2604a951043decd6acf4e2852fe35 (diff) | |
| parent | e857696cf8c3b4a4381d00424f165c10f93a9ebd (diff) | |
Rollup merge of #73361 - estebank:non-primitive-cast, r=davidtwco
Tweak "non-primitive cast" error - Suggest borrowing expression if it would allow cast to work. - Suggest using `<Type>::from(<expr>)` when appropriate. - Minor tweak to `;` typo suggestion. Partily address #47136.
Diffstat (limited to 'src/librustc_parse')
| -rw-r--r-- | src/librustc_parse/parser/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_parse/parser/diagnostics.rs b/src/librustc_parse/parser/diagnostics.rs index 8792605c08d..fc9ffc30924 100644 --- a/src/librustc_parse/parser/diagnostics.rs +++ b/src/librustc_parse/parser/diagnostics.rs @@ -961,7 +961,7 @@ impl<'a> Parser<'a> { self.bump(); let sp = self.prev_token.span; self.struct_span_err(sp, &msg) - .span_suggestion(sp, "change this to `;`", ";".to_string(), appl) + .span_suggestion_short(sp, "change this to `;`", ";".to_string(), appl) .emit(); return Ok(()); } else if self.look_ahead(0, |t| { |
