diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-12-19 19:29:56 +0900 |
|---|---|---|
| committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-12-30 22:33:13 +0900 |
| commit | 4ae99cc843b923d05e5c0993f732c5e0a9097852 (patch) | |
| tree | 0786fcfd161fac2bc6d8630b57d8705bc581d198 /compiler/rustc_parse/src | |
| parent | d107a87d34c1fc3521aaab7a2576ffbaf59cb2cb (diff) | |
| download | rust-4ae99cc843b923d05e5c0993f732c5e0a9097852.tar.gz rust-4ae99cc843b923d05e5c0993f732c5e0a9097852.zip | |
Fix ICE when pointing at multi bytes character
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index e19ebb8fd2f..1062000fede 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -721,13 +721,9 @@ impl<'a> Parser<'a> { Ok(t) => { // Parsed successfully, therefore most probably the code only // misses a separator. - let mut exp_span = self.sess.source_map().next_point(sp); - if self.sess.source_map().is_multiline(exp_span) { - exp_span = sp; - } expect_err .span_suggestion_short( - exp_span, + sp, &format!("missing `{}`", token_str), token_str, Applicability::MaybeIncorrect, |
