about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/source/issue-4984/multiple_comments_within.rs8
-rw-r--r--tests/target/issue-4984/multiple_comments_within.rs11
-rw-r--r--tests/target/issue-4984/should_not_change.rs5
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/source/issue-4984/multiple_comments_within.rs b/tests/source/issue-4984/multiple_comments_within.rs
new file mode 100644
index 00000000000..eb474a723d0
--- /dev/null
+++ b/tests/source/issue-4984/multiple_comments_within.rs
@@ -0,0 +1,8 @@
+#[derive(
+/* ---------- Some really important comment that just had to go inside the derive --------- */
+Debug, Clone,/* Another comment */Eq, PartialEq,
+)]
+struct Foo {
+    a: i32,
+    b: T,
+}
diff --git a/tests/target/issue-4984/multiple_comments_within.rs b/tests/target/issue-4984/multiple_comments_within.rs
new file mode 100644
index 00000000000..d2924f0d0f2
--- /dev/null
+++ b/tests/target/issue-4984/multiple_comments_within.rs
@@ -0,0 +1,11 @@
+#[derive(
+    /* ---------- Some really important comment that just had to go inside the derive --------- */
+    Debug,
+    Clone,
+    /* Another comment */ Eq,
+    PartialEq,
+)]
+struct Foo {
+    a: i32,
+    b: T,
+}
diff --git a/tests/target/issue-4984/should_not_change.rs b/tests/target/issue-4984/should_not_change.rs
new file mode 100644
index 00000000000..e46ee511084
--- /dev/null
+++ b/tests/target/issue-4984/should_not_change.rs
@@ -0,0 +1,5 @@
+#[derive(Clone, Debug, Eq, PartialEq)]
+struct Foo;
+
+#[derive(Clone)]
+struct Bar;