diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/source/issue_4584.rs | 19 | ||||
| -rw-r--r-- | tests/target/issue_4584.rs | 32 |
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/source/issue_4584.rs b/tests/source/issue_4584.rs new file mode 100644 index 00000000000..695c5590559 --- /dev/null +++ b/tests/source/issue_4584.rs @@ -0,0 +1,19 @@ +// rustfmt-indent_style: Visual + +#[derive(Debug,)] +pub enum Case { + Upper, + Lower +} + +#[derive(Debug, Clone, PartialEq, Eq,)] +pub enum Case { + Upper, + Lower +} + +// NB - This formatting looks potentially off the desired state, but is +// consistent with current behavior. Included here to provide a line wrapped +// derive case with the changes applied to resolve issue #4584 +#[derive(Add, Sub, Mul, Div, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Debug, Hash, Serialize, Mul,)] +struct Foo {} \ No newline at end of file diff --git a/tests/target/issue_4584.rs b/tests/target/issue_4584.rs new file mode 100644 index 00000000000..20255beadb2 --- /dev/null +++ b/tests/target/issue_4584.rs @@ -0,0 +1,32 @@ +// rustfmt-indent_style: Visual + +#[derive(Debug)] +pub enum Case { + Upper, + Lower, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Case { + Upper, + Lower, +} + +// NB - This formatting looks potentially off the desired state, but is +// consistent with current behavior. Included here to provide a line wrapped +// derive case with the changes applied to resolve issue #4584 +#[derive(Add, + Sub, + Mul, + Div, + Clone, + Copy, + Eq, + PartialEq, + Ord, + PartialOrd, + Debug, + Hash, + Serialize, + Mul)] +struct Foo {} |
