about summary refs log tree commit diff
path: root/tests/rustdoc-js-std
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-09-09 16:49:29 -0700
committerMichael Howell <michael@notriddle.com>2023-09-09 16:58:37 -0700
commit269cb579479ab950e85a2e4078810501c29d7465 (patch)
treeb6d4aa94a25ff007dc8d576055a30f5f8551519f /tests/rustdoc-js-std
parent9ccb217422628107b9b6388a30879ec0866ebc9c (diff)
downloadrust-269cb579479ab950e85a2e4078810501c29d7465.tar.gz
rust-269cb579479ab950e85a2e4078810501c29d7465.zip
rustdoc-search: fix bugs when unboxing and reordering combine
Diffstat (limited to 'tests/rustdoc-js-std')
-rw-r--r--tests/rustdoc-js-std/option-type-signatures.js5
-rw-r--r--tests/rustdoc-js-std/vec-type-signatures.js22
2 files changed, 26 insertions, 1 deletions
diff --git a/tests/rustdoc-js-std/option-type-signatures.js b/tests/rustdoc-js-std/option-type-signatures.js
index 37bb3b14ab3..e154fa707ab 100644
--- a/tests/rustdoc-js-std/option-type-signatures.js
+++ b/tests/rustdoc-js-std/option-type-signatures.js
@@ -1,3 +1,5 @@
+// ignore-order
+
 const FILTER_CRATE = "std";
 
 const EXPECTED = [
@@ -36,8 +38,9 @@ const EXPECTED = [
         ],
     },
     {
-        'query': 'option<t>, option<u> -> option<t, u>',
+        'query': 'option<t>, option<u> -> option<t>',
         'others': [
+            { 'path': 'std::option::Option', 'name': 'and' },
             { 'path': 'std::option::Option', 'name': 'zip' },
         ],
     },
diff --git a/tests/rustdoc-js-std/vec-type-signatures.js b/tests/rustdoc-js-std/vec-type-signatures.js
new file mode 100644
index 00000000000..18cf9d6efd0
--- /dev/null
+++ b/tests/rustdoc-js-std/vec-type-signatures.js
@@ -0,0 +1,22 @@
+// ignore-order
+
+const FILTER_CRATE = "std";
+
+const EXPECTED = [
+    {
+        'query': 'vec::intoiter<T> -> [T]',
+        'others': [
+            { 'path': 'std::vec::IntoIter', 'name': 'as_slice' },
+            { 'path': 'std::vec::IntoIter', 'name': 'as_mut_slice' },
+            { 'path': 'std::vec::IntoIter', 'name': 'next_chunk' },
+        ],
+    },
+    {
+        'query': 'vec::intoiter<T> -> []',
+        'others': [
+            { 'path': 'std::vec::IntoIter', 'name': 'as_slice' },
+            { 'path': 'std::vec::IntoIter', 'name': 'as_mut_slice' },
+            { 'path': 'std::vec::IntoIter', 'name': 'next_chunk' },
+        ],
+    },
+];