rustdoc-search: let From and Into be unboxed
This commit is contained in:
parent
f068d8b809
commit
246835eda4
3 changed files with 13 additions and 1 deletions
|
@ -443,6 +443,7 @@ pub trait AsMut<T: ?Sized> {
|
||||||
/// [`Vec`]: ../../std/vec/struct.Vec.html
|
/// [`Vec`]: ../../std/vec/struct.Vec.html
|
||||||
#[rustc_diagnostic_item = "Into"]
|
#[rustc_diagnostic_item = "Into"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[doc(search_unbox)]
|
||||||
pub trait Into<T>: Sized {
|
pub trait Into<T>: Sized {
|
||||||
/// Converts this type into the (usually inferred) input type.
|
/// Converts this type into the (usually inferred) input type.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
|
@ -577,6 +578,7 @@ pub trait Into<T>: Sized {
|
||||||
all(_Self = "&str", T = "alloc::string::String"),
|
all(_Self = "&str", T = "alloc::string::String"),
|
||||||
note = "to coerce a `{T}` into a `{Self}`, use `&*` as a prefix",
|
note = "to coerce a `{T}` into a `{Self}`, use `&*` as a prefix",
|
||||||
))]
|
))]
|
||||||
|
#[doc(search_unbox)]
|
||||||
pub trait From<T>: Sized {
|
pub trait From<T>: Sized {
|
||||||
/// Converts to this type from the input type.
|
/// Converts to this type from the input type.
|
||||||
#[rustc_diagnostic_item = "from_fn"]
|
#[rustc_diagnostic_item = "from_fn"]
|
||||||
|
|
|
@ -22,4 +22,14 @@ const EXPECTED = [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'query': 'tyctxt, defid, symbol -> bool',
|
||||||
|
'others': [
|
||||||
|
{
|
||||||
|
'path': 'foo::TyCtxt',
|
||||||
|
'name': 'has_attr',
|
||||||
|
'displayType': "`TyCtxt`, Into<`DefId`>, `Symbol` -> `bool`",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![crate_name="foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
pub struct TyCtxt;
|
pub struct TyCtxt;
|
||||||
pub struct DefId;
|
pub struct DefId;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue