initial step towards implementing C string literals
This commit is contained in:
parent
7b99493492
commit
8ff3903643
17 changed files with 312 additions and 82 deletions
|
@ -32,6 +32,10 @@ pub fn expand_concat(
|
|||
Ok(ast::LitKind::Bool(b)) => {
|
||||
accumulator.push_str(&b.to_string());
|
||||
}
|
||||
Ok(ast::LitKind::CStr(..)) => {
|
||||
cx.span_err(e.span, "cannot concatenate a C string literal");
|
||||
has_errors = true;
|
||||
}
|
||||
Ok(ast::LitKind::Byte(..) | ast::LitKind::ByteStr(..)) => {
|
||||
cx.emit_err(errors::ConcatBytestr { span: e.span });
|
||||
has_errors = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue