diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2019-01-20 14:51:54 +0900 |
|---|---|---|
| committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2019-01-20 14:51:54 +0900 |
| commit | a4ff1dcc534e9ae132e5b201a8f6e7dd06fbd9ee (patch) | |
| tree | b0a215286a480d863d5d9ac6b295f52b0386bc58 /src/libsyntax/parse/mod.rs | |
| parent | e9af312932baee90d260b41711f7ea95ad51bc07 (diff) | |
| download | rust-a4ff1dcc534e9ae132e5b201a8f6e7dd06fbd9ee.tar.gz rust-a4ff1dcc534e9ae132e5b201a8f6e7dd06fbd9ee.zip | |
Mark incorrect recovered `char` literals as `TyErr` to avoid type errors
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index cbb503f56bc..9e55f359b5e 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -466,7 +466,7 @@ crate fn lit_token(lit: token::Lit, suf: Option<Symbol>, diag: Option<(Span, &Ha match lit { token::Byte(i) => (true, Some(LitKind::Byte(byte_lit(&i.as_str()).0))), token::Char(i) => (true, Some(LitKind::Char(char_lit(&i.as_str(), diag).0))), - token::Err(i) => (true, Some(LitKind::Char(char_lit(&i.as_str(), diag).0))), + token::Err(i) => (true, Some(LitKind::Err(i))), // There are some valid suffixes for integer and float literals, // so all the handling is done internally. |
