]> git.lizzy.rs Git - rust.git/commit
Avoid using pretty printer if possible
authortopecongiro <seuchida@gmail.com>
Sun, 18 Feb 2018 09:18:07 +0000 (18:18 +0900)
committertopecongiro <seuchida@gmail.com>
Mon, 19 Feb 2018 03:52:40 +0000 (12:52 +0900)
commit61c6c591e4fdf1eec729469689c1ca27905b0f4c
tree58b1a5852c4a382a76f3a14a94eb835c9e33eed1
parentd7d9850c42ed7e49d0eebcedb3d9cc37d0309aa2
Avoid using pretty printer if possible

Setting a pretty printer adds noticeable overhead.

We can replace the usage in `ast:Lifetime::rewrite` by simply converting `Ident`
to string.
We can do the same thing for a macro path as long as it is not nested, which
should hold for most cases.
rustfmt-core/src/macros.rs
rustfmt-core/src/types.rs