about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-03-27 16:36:05 +0000
committerbors <bors@rust-lang.org>2022-03-27 16:36:05 +0000
commitd7aca22e7fd9fdfdc60e30117e54ed479fd7bf7a (patch)
tree34f9834640f08cb7c178145550a235ea663f3d1b /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent100f12d17026fccfc5d80527b5976dd66b228b13 (diff)
parent2ac9efbe950419979050ff14feb7fb89df4806a0 (diff)
downloadrust-d7aca22e7fd9fdfdc60e30117e54ed479fd7bf7a.tar.gz
rust-d7aca22e7fd9fdfdc60e30117e54ed479fd7bf7a.zip
Auto merge of #95345 - dtolnay:escape0, r=Dylan-DPC
Debug print char 0 as '\0' rather than '\u{0}'

```rust
println!("{:?}", "foo\0");
```

- **Before:** `"foo\u{0}"`
- **After:** `"foo\0"`

```rust
println!("{:?}", '\0');
```

- **Before:** `'\u{0}'`
- **After:** `'\0'`

`'\0'` will be more recognizable to everyone than `'\u{0}'` because it's how we talk about character 0 in all of our docs and example code, such as https://doc.rust-lang.org/std/ffi/index.html, https://doc.rust-lang.org/std/ffi/struct.CStr.html, https://doc.rust-lang.org/std/ffi/struct.CString.html.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions