about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYacin Tmimi <ytmimi@horizonmedia.com>2021-09-29 14:18:54 -0400
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2021-10-05 22:29:23 -0500
commit365a2f8f6e710f67d6485fe9004bb3f64da977bc (patch)
tree159dacc9d4f20ef3f4eefc19a2d10fd40533a17d
parent40f4993c67ff54e413da17496769407ab85f3924 (diff)
downloadrust-365a2f8f6e710f67d6485fe9004bb3f64da977bc.tar.gz
rust-365a2f8f6e710f67d6485fe9004bb3f64da977bc.zip
Add additional test cases for issue 4984
-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;