diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-08-01 15:08:01 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-08-03 19:58:56 +1000 |
| commit | 03dab500a2a885c3cf196d6d72695deda7da7698 (patch) | |
| tree | eff9b39055ab41daa3af94305fb83c5a46a8aa4c /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 03bc1be8dd9be8fb6a0672e89731d0826dff0a09 (diff) | |
| download | rust-03dab500a2a885c3cf196d6d72695deda7da7698.tar.gz rust-03dab500a2a885c3cf196d6d72695deda7da7698.zip | |
Remove `p!`.
It's a cryptic macro that makes some things slightly more concise in
`PrettyPrinter`. E.g. if you declare `define_scope_printer!(p)` in a
scope you can then call `p! to get these transformations:
```
p!("foo"); --> write!(p, "foo")?;
p!(print(ty)); --> ty.print(p)?;
p!(method(args)); --> p.method(args)?;
```
You can also chain calls, e.g.:
```
p!("foo", print(ty)); --> write!(p, "foo")?; ty.print(p)?;
```
Ultimately this doesn't seem worth it. The macro definition is hard to
read, the call sites are hard to read, `define_scope_printer!` is pretty
gross, and the code size reductions are small. Tellingly, many normal
`write!` and `print` calls are sprinkled throughout the code, probably
because people have made modifications and didn't want to use or
understand how to use `p!`.
This commit removes it.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
