Make ExtCtxt::expr_lit
non-pub
.
By using `expr_str` more and adding `expr_{char,byte_str}`.
This commit is contained in:
parent
7d1e5a485c
commit
d7a041f607
5 changed files with 23 additions and 18 deletions
|
@ -216,7 +216,7 @@ pub fn expand_include_bytes(
|
|||
}
|
||||
};
|
||||
match cx.source_map().load_binary_file(&file) {
|
||||
Ok(bytes) => base::MacEager::expr(cx.expr_lit(sp, ast::LitKind::ByteStr(bytes.into()))),
|
||||
Ok(bytes) => base::MacEager::expr(cx.expr_byte_str(sp, bytes)),
|
||||
Err(e) => {
|
||||
cx.span_err(sp, &format!("couldn't read {}: {}", file.display(), e));
|
||||
DummyResult::any(sp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue