Mark incorrect recovered char literals as TyErr to avoid type errors

This commit is contained in:
Yuki Okushi
2019-01-20 14:51:54 +09:00
parent e9af312932
commit a4ff1dcc53
9 changed files with 26 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ pub fn expand_syntax_ext(
match e.node {
ast::ExprKind::Lit(ref lit) => match lit.node {
ast::LitKind::Str(ref s, _)
| ast::LitKind::Err(ref s)
| ast::LitKind::Float(ref s, _)
| ast::LitKind::FloatUnsuffixed(ref s) => {
accumulator.push_str(&s.as_str());