diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs index 432e55e8c9a4..e468f4f0f7e6 100644 --- a/library/core/src/convert/mod.rs +++ b/library/core/src/convert/mod.rs @@ -443,6 +443,7 @@ pub trait AsMut { /// [`Vec`]: ../../std/vec/struct.Vec.html #[rustc_diagnostic_item = "Into"] #[stable(feature = "rust1", since = "1.0.0")] +#[doc(search_unbox)] pub trait Into: Sized { /// Converts this type into the (usually inferred) input type. #[must_use] @@ -577,6 +578,7 @@ pub trait Into: Sized { all(_Self = "&str", T = "alloc::string::String"), note = "to coerce a `{T}` into a `{Self}`, use `&*` as a prefix", ))] +#[doc(search_unbox)] pub trait From: Sized { /// Converts to this type from the input type. #[rustc_diagnostic_item = "from_fn"] diff --git a/tests/rustdoc-js/impl-trait-inlining.js b/tests/rustdoc-js/impl-trait-inlining.js index 02c9853dd63f..e97669c7b308 100644 --- a/tests/rustdoc-js/impl-trait-inlining.js +++ b/tests/rustdoc-js/impl-trait-inlining.js @@ -22,4 +22,14 @@ const EXPECTED = [ }, ], }, + { + 'query': 'tyctxt, defid, symbol -> bool', + 'others': [ + { + 'path': 'foo::TyCtxt', + 'name': 'has_attr', + 'displayType': "`TyCtxt`, Into<`DefId`>, `Symbol` -> `bool`", + }, + ], + }, ]; diff --git a/tests/rustdoc-js/impl-trait-inlining.rs b/tests/rustdoc-js/impl-trait-inlining.rs index a6ca0dcbd8dd..f90fb72659ae 100644 --- a/tests/rustdoc-js/impl-trait-inlining.rs +++ b/tests/rustdoc-js/impl-trait-inlining.rs @@ -1,4 +1,4 @@ -#![crate_name="foo"] +#![crate_name = "foo"] pub struct TyCtxt; pub struct DefId;