about summary refs log tree commit diff
path: root/tests/rustdoc-js-std
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-03-07 11:21:12 -0700
committerMichael Howell <michael@notriddle.com>2023-03-07 11:37:04 -0700
commit44813e038c62ac975f4efaf8fb588949d24528af (patch)
tree731356c11b1a7195166970df184fb29548bec65c /tests/rustdoc-js-std
parenta6446c53fe8be6692b07e121b831c3db770ff94a (diff)
downloadrust-44813e038c62ac975f4efaf8fb588949d24528af.tar.gz
rust-44813e038c62ac975f4efaf8fb588949d24528af.zip
rustdoc: fix type search when more than one `where` clause applies
Diffstat (limited to 'tests/rustdoc-js-std')
-rw-r--r--tests/rustdoc-js-std/option-type-signatures.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/rustdoc-js-std/option-type-signatures.js b/tests/rustdoc-js-std/option-type-signatures.js
index dee4819e81a..6bf421a2135 100644
--- a/tests/rustdoc-js-std/option-type-signatures.js
+++ b/tests/rustdoc-js-std/option-type-signatures.js
@@ -1,7 +1,18 @@
-const QUERY = 'option, fnonce -> option';
+const QUERY = [
+    'option, fnonce -> option',
+    'option -> default',
+];
 
-const EXPECTED = {
-    'others': [
-        { 'path': 'std::option::Option', 'name': 'map' },
-    ],
-};
+const EXPECTED = [
+    {
+        'others': [
+            { 'path': 'std::option::Option', 'name': 'map' },
+        ],
+    },
+    {
+        'others': [
+            { 'path': 'std::option::Option', 'name': 'unwrap_or_default' },
+            { 'path': 'std::option::Option', 'name': 'get_or_insert_default' },
+        ],
+    },
+];