summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-3974.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/issue-3974.rs')
-rw-r--r--src/tools/rustfmt/tests/target/issue-3974.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue-3974.rs b/src/tools/rustfmt/tests/target/issue-3974.rs
new file mode 100644
index 000000000..a9f992ebd
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/issue-3974.rs
@@ -0,0 +1,10 @@
+fn emulate_foreign_item() {
+ match link_name {
+ // A comment here will duplicate the attribute
+ #[rustfmt::skip]
+ | "pthread_mutexattr_init"
+ | "pthread_mutexattr_settype"
+ | "pthread_mutex_init"
+ => {}
+ }
+}