]> git.lizzy.rs Git - rust.git/commit
Return the original snippet if the attribute contains invalid syntax
authortopecongiro <seuchida@gmail.com>
Tue, 20 Feb 2018 05:48:46 +0000 (14:48 +0900)
committertopecongiro <seuchida@gmail.com>
Tue, 20 Feb 2018 05:48:46 +0000 (14:48 +0900)
commitb4c85d1bcbe5375604eb02854318560cebaf6a03
tree30c4acfe54142bf4fa2f2d0efaae1218b08c6f1d
parentbe79f5e433937f04e7bd1c4d0f68612c66a63205
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]`.
rustfmt-core/src/visitor.rs
rustfmt-core/tests/source/macro_rules.rs
rustfmt-core/tests/target/macro_rules.rs