6 Commits

Author SHA1 Message Date
topecongiro
093633ecb7 Update tests for #2438 and #2476 2018-02-23 08:10:17 +09:00
topecongiro
b4c85d1bcb Return the original snippet if the attribute contains invalid syntax
This allows us to keep formatting the macro def with attributes that become
invalid syntax when the `$` is replaced with `z`, e.g. `#[doc = $expr]`.
2018-02-20 14:48:46 +09:00
topecongiro
37f82a0c95 Skip formatting macro_rules! that are not using {} 2018-02-19 14:08:33 +09:00
topecongiro
785da7439f Return None when format_code_block may have failed 2018-02-14 19:00:45 +09:00
topecongiro
b49b30746d Disable formatting macro-def if args do not fit on one line 2018-02-14 04:00:26 +09:00
topecongiro
4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00