about summary refs log tree commit diff
path: root/tests/rustdoc-js/impl-trait-inlining.js
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2024-12-13 10:47:02 -0700
committerMichael Howell <michael@notriddle.com>2024-12-13 10:47:20 -0700
commitf068d8b809e09f4c685bddeebfe63e736a02d473 (patch)
treea0f9dfb5015704c5b912efeabc6e0ae546e3753b /tests/rustdoc-js/impl-trait-inlining.js
parent4847d6a9d07d4be9ba3196f6ad444af2d7bdde72 (diff)
downloadrust-f068d8b809e09f4c685bddeebfe63e736a02d473.tar.gz
rust-f068d8b809e09f4c685bddeebfe63e736a02d473.zip
rustdoc-search: show `impl Trait` inline when unhighlighted
While normal generics can be skipped in this case, no-names need
something to show here.

Before: `TyCtxt, , Symbol -> bool`

After: `TyCtxt, Into<DefId>, Symbol -> bool`
Diffstat (limited to 'tests/rustdoc-js/impl-trait-inlining.js')
-rw-r--r--tests/rustdoc-js/impl-trait-inlining.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/rustdoc-js/impl-trait-inlining.js b/tests/rustdoc-js/impl-trait-inlining.js
new file mode 100644
index 00000000000..02c9853dd63
--- /dev/null
+++ b/tests/rustdoc-js/impl-trait-inlining.js
@@ -0,0 +1,25 @@
+// exact-check
+// ignore-order
+
+const EXPECTED = [
+    {
+        'query': 'tyctxt, symbol -> bool',
+        'others': [
+            {
+                'path': 'foo::TyCtxt',
+                'name': 'has_attr',
+                'displayType': "`TyCtxt`, Into<DefId>, `Symbol` -> `bool`",
+            },
+        ],
+    },
+    {
+        'query': 'tyctxt, into<defid>, symbol -> bool',
+        'others': [
+            {
+                'path': 'foo::TyCtxt',
+                'name': 'has_attr',
+                'displayType': "`TyCtxt`, `Into`<`DefId`>, `Symbol` -> `bool`",
+            },
+        ],
+    },
+];