Make diangostic item names consistent
This commit is contained in:
parent
f03eb6bef8
commit
eec856bfbc
123 changed files with 244 additions and 248 deletions
|
|
@ -269,7 +269,7 @@ pub trait AsMut<T: ?Sized> {
|
|||
///
|
||||
/// [`String`]: ../../std/string/struct.String.html
|
||||
/// [`Vec`]: ../../std/vec/struct.Vec.html
|
||||
#[rustc_diagnostic_item = "into_trait"]
|
||||
#[rustc_diagnostic_item = "Into"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait Into<T>: Sized {
|
||||
/// Performs the conversion.
|
||||
|
|
@ -358,7 +358,7 @@ pub trait Into<T>: Sized {
|
|||
/// [`String`]: ../../std/string/struct.String.html
|
||||
/// [`from`]: From::from
|
||||
/// [book]: ../../book/ch09-00-error-handling.html
|
||||
#[rustc_diagnostic_item = "from_trait"]
|
||||
#[rustc_diagnostic_item = "From"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_on_unimplemented(on(
|
||||
all(_Self = "&str", T = "std::string::String"),
|
||||
|
|
@ -385,7 +385,7 @@ pub trait From<T>: Sized {
|
|||
///
|
||||
/// This suffers the same restrictions and reasoning as implementing
|
||||
/// [`Into`], see there for details.
|
||||
#[rustc_diagnostic_item = "try_into_trait"]
|
||||
#[rustc_diagnostic_item = "TryInto"]
|
||||
#[stable(feature = "try_from", since = "1.34.0")]
|
||||
pub trait TryInto<T>: Sized {
|
||||
/// The type returned in the event of a conversion error.
|
||||
|
|
@ -465,7 +465,7 @@ pub trait TryInto<T>: Sized {
|
|||
/// ```
|
||||
///
|
||||
/// [`try_from`]: TryFrom::try_from
|
||||
#[rustc_diagnostic_item = "try_from_trait"]
|
||||
#[rustc_diagnostic_item = "TryFrom"]
|
||||
#[stable(feature = "try_from", since = "1.34.0")]
|
||||
pub trait TryFrom<T>: Sized {
|
||||
/// The type returned in the event of a conversion error.
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ impl Display for Arguments<'_> {
|
|||
label = "`{Self}` cannot be formatted using `{{:?}}` because it doesn't implement `{Debug}`"
|
||||
)]
|
||||
#[doc(alias = "{:?}")]
|
||||
#[rustc_diagnostic_item = "debug_trait"]
|
||||
#[rustc_diagnostic_item = "Debug"]
|
||||
#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)]
|
||||
pub trait Debug {
|
||||
/// Formats the value using the given formatter.
|
||||
|
|
@ -710,7 +710,7 @@ pub use macros::Debug;
|
|||
note = "in format strings you may be able to use `{{:?}}` (or {{:#?}} for pretty-print) instead"
|
||||
)]
|
||||
#[doc(alias = "{}")]
|
||||
#[rustc_diagnostic_item = "display_trait"]
|
||||
#[rustc_diagnostic_item = "Display"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait Display {
|
||||
/// Formats the value using the given formatter.
|
||||
|
|
@ -1003,7 +1003,7 @@ pub trait UpperHex {
|
|||
/// assert_eq!(&l_ptr[..2], "0x");
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_diagnostic_item = "pointer_trait"]
|
||||
#[rustc_diagnostic_item = "Pointer"]
|
||||
pub trait Pointer {
|
||||
/// Formats the value using the given formatter.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ use crate::hash::Hasher;
|
|||
/// [arc]: ../../std/sync/struct.Arc.html
|
||||
/// [ub]: ../../reference/behavior-considered-undefined.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "send_trait")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
|
||||
#[rustc_on_unimplemented(
|
||||
message = "`{Self}` cannot be sent between threads safely",
|
||||
label = "`{Self}` cannot be sent between threads safely"
|
||||
|
|
@ -459,7 +459,7 @@ pub macro Copy($item:item) {
|
|||
/// [transmute]: crate::mem::transmute
|
||||
/// [nomicon-send-and-sync]: ../../nomicon/send-and-sync.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "sync_trait")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "Sync")]
|
||||
#[lang = "sync"]
|
||||
#[rustc_on_unimplemented(
|
||||
message = "`{Self}` cannot be shared between threads safely",
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ use crate::{
|
|||
|
||||
/// The `Option` type. See [the module level documentation](self) for more.
|
||||
#[derive(Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
|
||||
#[rustc_diagnostic_item = "option_type"]
|
||||
#[rustc_diagnostic_item = "Option"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub enum Option<T> {
|
||||
/// No value
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ use crate::{convert, fmt, hint};
|
|||
/// See the [module documentation](self) for details.
|
||||
#[derive(Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
|
||||
#[must_use = "this `Result` may be an `Err` variant, which should be handled"]
|
||||
#[rustc_diagnostic_item = "result_type"]
|
||||
#[rustc_diagnostic_item = "Result"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub enum Result<T, E> {
|
||||
/// Contains the success value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue