diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-10-02 18:51:01 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-10-02 19:38:19 -0500 |
| commit | eec856bfbcd79d12352f81b44a9f04e5bb06bda5 (patch) | |
| tree | de49e7a7c12ca371082c5ff3356eb271853cc5bb /library/core/src | |
| parent | f03eb6bef8ced8a243858b819e013b9caf83d757 (diff) | |
| download | rust-eec856bfbcd79d12352f81b44a9f04e5bb06bda5.tar.gz rust-eec856bfbcd79d12352f81b44a9f04e5bb06bda5.zip | |
Make diangostic item names consistent
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/convert/mod.rs | 8 | ||||
| -rw-r--r-- | library/core/src/fmt/mod.rs | 6 | ||||
| -rw-r--r-- | library/core/src/marker.rs | 4 | ||||
| -rw-r--r-- | library/core/src/option.rs | 2 | ||||
| -rw-r--r-- | library/core/src/result.rs | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs index 1e512af4805..abeeef1a17e 100644 --- a/library/core/src/convert/mod.rs +++ b/library/core/src/convert/mod.rs @@ -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. diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 31da3ef87b9..d10563a4097 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -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")] diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index a7ed5bfaf85..37446bafacb 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -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", diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 94d892dd787..b2cc7145702 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -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 diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 4a300f857e9..a34964b531d 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -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 |
