about summary refs log tree commit diff
path: root/src/test/rustdoc-json
diff options
context:
space:
mode:
authorNixon Enraght-Moony <nixon.emoony@gmail.com>2022-10-14 19:57:01 +0100
committerNixon Enraght-Moony <nixon.emoony@gmail.com>2022-10-14 19:57:01 +0100
commitbb04e7e2a2bd0f1a8e0034f6f93bb00673b4c210 (patch)
tree3627526581a91e0c0031fd8e852fda34cdd0b8af /src/test/rustdoc-json
parentee1c3b385b6673b6ef37d80dfabe048e993c2ae2 (diff)
downloadrust-bb04e7e2a2bd0f1a8e0034f6f93bb00673b4c210.tar.gz
rust-bb04e7e2a2bd0f1a8e0034f6f93bb00673b4c210.zip
rustdoc-json: Document and Test that args can be patterns.
Diffstat (limited to 'src/test/rustdoc-json')
-rw-r--r--src/test/rustdoc-json/fns/pattern_arg.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/rustdoc-json/fns/pattern_arg.rs b/src/test/rustdoc-json/fns/pattern_arg.rs
new file mode 100644
index 00000000000..32b7da0fae4
--- /dev/null
+++ b/src/test/rustdoc-json/fns/pattern_arg.rs
@@ -0,0 +1,7 @@
+// @is "$.index[*][?(@.name=='fst')].inner.decl.inputs[0][0]" '"(x, _)"'
+pub fn fst<X, Y>((x, _): (X, Y)) -> X {
+    x
+}
+
+// @is "$.index[*][?(@.name=='drop_int')].inner.decl.inputs[0][0]" '"_"'
+pub fn drop_int(_: i32) {}