summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-3508.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/issue-3508.rs')
-rw-r--r--src/tools/rustfmt/tests/target/issue-3508.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue-3508.rs b/src/tools/rustfmt/tests/target/issue-3508.rs
new file mode 100644
index 000000000..5f4e15658
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/issue-3508.rs
@@ -0,0 +1,22 @@
+fn foo<F>(foo2: F)
+where
+ F: Fn(
+ // this comment is deleted
+ ),
+{
+}
+
+fn foo_block<F>(foo2: F)
+where
+ F: Fn(/* this comment is deleted */),
+{
+}
+
+fn bar(
+ bar2: impl Fn(
+ // this comment is deleted
+ ),
+) {
+}
+
+fn bar_block(bar2: impl Fn(/* this comment is deleted */)) {}