From f068d8b809e09f4c685bddeebfe63e736a02d473 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 13 Dec 2024 10:47:02 -0700 Subject: 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, Symbol -> bool` --- tests/rustdoc-js/impl-trait-inlining.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/rustdoc-js/impl-trait-inlining.js (limited to 'tests/rustdoc-js/impl-trait-inlining.js') 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, `Symbol` -> `bool`", + }, + ], + }, + { + 'query': 'tyctxt, into, symbol -> bool', + 'others': [ + { + 'path': 'foo::TyCtxt', + 'name': 'has_attr', + 'displayType': "`TyCtxt`, `Into`<`DefId`>, `Symbol` -> `bool`", + }, + ], + }, +]; -- cgit 1.4.1-3-g733a5