about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/trait-unbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-js-std/trait-unbox.js')
-rw-r--r--tests/rustdoc-js-std/trait-unbox.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rustdoc-js-std/trait-unbox.js b/tests/rustdoc-js-std/trait-unbox.js
new file mode 100644
index 00000000000..44ddc0c1e75
--- /dev/null
+++ b/tests/rustdoc-js-std/trait-unbox.js
@@ -0,0 +1,16 @@
+// make sure type-based searches with traits get unboxed too
+
+const EXPECTED = [
+    {
+        'query': 'any -> result<box>',
+        'others': [
+            { 'path': 'std::boxed::Box', 'name': 'downcast' },
+        ],
+    },
+    {
+        'query': 'split<bufread> -> option<result<vec<u8>>>',
+        'others': [
+            { 'path': 'std::io::Split', 'name': 'next' },
+        ],
+    },
+];