about summary refs log tree commit diff
path: root/tests/rustdoc-js/impl-trait-inlining.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-16 20:00:20 +0100
committerGitHub <noreply@github.com>2024-12-16 20:00:20 +0100
commitd9ba4bf6feb9b49f6a7e63097705cc39cef63234 (patch)
tree1f98359986f4f2d4ef15c2bd89aaa555e9b5a03d /tests/rustdoc-js/impl-trait-inlining.rs
parent9451a6132a447ef95384fb4ffa75974a6d05d74d (diff)
parent0be3ed0d8fe9e74963117db7c2d93d383cfcacc4 (diff)
downloadrust-d9ba4bf6feb9b49f6a7e63097705cc39cef63234.tar.gz
rust-d9ba4bf6feb9b49f6a7e63097705cc39cef63234.zip
Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez
rustdoc-search: handle `impl Into<X>` better

This PR fixes two bugs I ran into while searching the compiler docs:

- It omitted an `impl Trait` entry in the type signature field, producing `TyCtxt, , Symbol -> bool`
- It didn't let me search for `TyCtxt, DefId, Symbol -> bool` even though that's a perfectly good description of the function I was looking for (the function actually used `impl Into<DefId>`

r? ``@GuillaumeGomez`` cc ``@lolbinarycat``
Diffstat (limited to 'tests/rustdoc-js/impl-trait-inlining.rs')
-rw-r--r--tests/rustdoc-js/impl-trait-inlining.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/rustdoc-js/impl-trait-inlining.rs b/tests/rustdoc-js/impl-trait-inlining.rs
new file mode 100644
index 00000000000..f90fb72659a
--- /dev/null
+++ b/tests/rustdoc-js/impl-trait-inlining.rs
@@ -0,0 +1,11 @@
+#![crate_name = "foo"]
+
+pub struct TyCtxt;
+pub struct DefId;
+pub struct Symbol;
+
+impl TyCtxt {
+    pub fn has_attr(self, _did: impl Into<DefId>, _attr: Symbol) -> bool {
+        unimplemented!();
+    }
+}