diff options
| author | P1start <rewi-github@whanau.org> | 2015-07-07 15:19:50 +1200 |
|---|---|---|
| committer | P1start <rewi-github@whanau.org> | 2015-07-18 13:12:26 +1200 |
| commit | 3ebf706cf7db582c8b3a1f61c92184daeaf1f811 (patch) | |
| tree | fb319b0afb05d062cfd7d66199b5e5793b1e4afe /src/rustllvm/RustWrapper.cpp | |
| parent | e05ac3938bcbdd616930bb010a3bbfa35f22850e (diff) | |
| download | rust-3ebf706cf7db582c8b3a1f61c92184daeaf1f811.tar.gz rust-3ebf706cf7db582c8b3a1f61c92184daeaf1f811.zip | |
Define and use a `print_maybe_styled!` macro in libsyntax/diagnostic.rs
`EmitterWriter::print_maybe_styled` was basically always used with `format!`, so this macro makes some code cleaner. It should also remove some unnecessary allocations (most `print_maybe_styled` invocations allocated a `String` previously, whereas the new macro uses `write_fmt` to write the formatted string directly to the terminal). This probably could have been part of #26838, but it’s too late now.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
