about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/alloc_example.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-08 11:28:42 +0000
committerbors <bors@rust-lang.org>2022-08-08 11:28:42 +0000
commitb569bbbaccfc0aa24cae76a6a62c40adc74842bd (patch)
tree20b3c42b0c6bbdc364585d58214c962e62c8a07e /compiler/rustc_codegen_gcc/example/alloc_example.rs
parent634cfe3d72e785c843ca5d412b12be137b2e14fb (diff)
parent4d5873e92f50f3f08f98f04ade4768f9d9ab380f (diff)
downloadrust-b569bbbaccfc0aa24cae76a6a62c40adc74842bd.tar.gz
rust-b569bbbaccfc0aa24cae76a6a62c40adc74842bd.zip
Auto merge of #12942 - lowr:fix/concat-with-char, r=Veykril
fix: make `concat!` work with char

Fixes #12921

- I avoided making `unquote_str()` take char literals as well because it's depended on by another function `parse_string()` that's only supposed to take strings.
- Even with this patch, we don't output `\0` as `\u{0}` which #12921 pointed out ~~, but we're not actually responsible for serializing it but rowan is~~. They are functionally equivalent and I don't think it'd cause any confusion, but we *could* try escaping them before serialization (for reference, `rustc -Zunpretty=expanded`, which `cargo expand` uses under the hood, [makes use of `str::escape_default()`](https://github.com/rust-lang/rust/blob/3830ecaa8db798d2727cbdfa4ddf314ff938f268/compiler/rustc_ast/src/util/literal.rs#L161).
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/alloc_example.rs')
0 files changed, 0 insertions, 0 deletions