Skip to content

Commit eba8ed6

Browse files
committed
Make diangostic item names consistent
1 parent 5ca3a77 commit eba8ed6

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

alloc/src/collections/vec_deque/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const MAXIMUM_ZST_CAPACITY: usize = 1 << (usize::BITS - 1); // Largest possible
8888
/// [`extend`]: VecDeque::extend
8989
/// [`append`]: VecDeque::append
9090
/// [`make_contiguous`]: VecDeque::make_contiguous
91-
#[cfg_attr(not(test), rustc_diagnostic_item = "vecdeque_type")]
91+
#[cfg_attr(not(test), rustc_diagnostic_item = "VecDeque")]
9292
#[stable(feature = "rust1", since = "1.0.0")]
9393
#[rustc_insignificant_dtor]
9494
pub struct VecDeque<

alloc/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ use crate::vec::Vec;
289289
/// [`Deref`]: core::ops::Deref "ops::Deref"
290290
/// [`as_str()`]: String::as_str
291291
#[derive(PartialOrd, Eq, Ord)]
292-
#[cfg_attr(not(test), rustc_diagnostic_item = "string_type")]
292+
#[cfg_attr(not(test), rustc_diagnostic_item = "String")]
293293
#[stable(feature = "rust1", since = "1.0.0")]
294294
pub struct String {
295295
vec: Vec<u8>,

alloc/src/vec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ mod spec_extend;
395395
/// [`MaybeUninit`]: core::mem::MaybeUninit
396396
/// [owned slice]: Box
397397
#[stable(feature = "rust1", since = "1.0.0")]
398-
#[cfg_attr(not(test), rustc_diagnostic_item = "vec_type")]
398+
#[cfg_attr(not(test), rustc_diagnostic_item = "Vec")]
399399
#[rustc_insignificant_dtor]
400400
pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
401401
buf: RawVec<T, A>,

core/src/convert/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub trait AsMut<T: ?Sized> {
269269
///
270270
/// [`String`]: ../../std/string/struct.String.html
271271
/// [`Vec`]: ../../std/vec/struct.Vec.html
272-
#[rustc_diagnostic_item = "into_trait"]
272+
#[rustc_diagnostic_item = "Into"]
273273
#[stable(feature = "rust1", since = "1.0.0")]
274274
pub trait Into<T>: Sized {
275275
/// Performs the conversion.
@@ -358,7 +358,7 @@ pub trait Into<T>: Sized {
358358
/// [`String`]: ../../std/string/struct.String.html
359359
/// [`from`]: From::from
360360
/// [book]: ../../book/ch09-00-error-handling.html
361-
#[rustc_diagnostic_item = "from_trait"]
361+
#[rustc_diagnostic_item = "From"]
362362
#[stable(feature = "rust1", since = "1.0.0")]
363363
#[rustc_on_unimplemented(on(
364364
all(_Self = "&str", T = "std::string::String"),
@@ -385,7 +385,7 @@ pub trait From<T>: Sized {
385385
///
386386
/// This suffers the same restrictions and reasoning as implementing
387387
/// [`Into`], see there for details.
388-
#[rustc_diagnostic_item = "try_into_trait"]
388+
#[rustc_diagnostic_item = "TryInto"]
389389
#[stable(feature = "try_from", since = "1.34.0")]
390390
pub trait TryInto<T>: Sized {
391391
/// The type returned in the event of a conversion error.
@@ -465,7 +465,7 @@ pub trait TryInto<T>: Sized {
465465
/// ```
466466
///
467467
/// [`try_from`]: TryFrom::try_from
468-
#[rustc_diagnostic_item = "try_from_trait"]
468+
#[rustc_diagnostic_item = "TryFrom"]
469469
#[stable(feature = "try_from", since = "1.34.0")]
470470
pub trait TryFrom<T>: Sized {
471471
/// The type returned in the event of a conversion error.

core/src/fmt/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ impl Display for Arguments<'_> {
617617
label = "`{Self}` cannot be formatted using `{{:?}}` because it doesn't implement `{Debug}`"
618618
)]
619619
#[doc(alias = "{:?}")]
620-
#[rustc_diagnostic_item = "debug_trait"]
620+
#[rustc_diagnostic_item = "Debug"]
621621
#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)]
622622
pub trait Debug {
623623
/// Formats the value using the given formatter.
@@ -710,7 +710,7 @@ pub use macros::Debug;
710710
note = "in format strings you may be able to use `{{:?}}` (or {{:#?}} for pretty-print) instead"
711711
)]
712712
#[doc(alias = "{}")]
713-
#[rustc_diagnostic_item = "display_trait"]
713+
#[rustc_diagnostic_item = "Display"]
714714
#[stable(feature = "rust1", since = "1.0.0")]
715715
pub trait Display {
716716
/// Formats the value using the given formatter.
@@ -1003,7 +1003,7 @@ pub trait UpperHex {
10031003
/// assert_eq!(&l_ptr[..2], "0x");
10041004
/// ```
10051005
#[stable(feature = "rust1", since = "1.0.0")]
1006-
#[rustc_diagnostic_item = "pointer_trait"]
1006+
#[rustc_diagnostic_item = "Pointer"]
10071007
pub trait Pointer {
10081008
/// Formats the value using the given formatter.
10091009
#[stable(feature = "rust1", since = "1.0.0")]

core/src/marker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use crate::hash::Hasher;
3030
/// [arc]: ../../std/sync/struct.Arc.html
3131
/// [ub]: ../../reference/behavior-considered-undefined.html
3232
#[stable(feature = "rust1", since = "1.0.0")]
33-
#[cfg_attr(not(test), rustc_diagnostic_item = "send_trait")]
33+
#[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
3434
#[rustc_on_unimplemented(
3535
message = "`{Self}` cannot be sent between threads safely",
3636
label = "`{Self}` cannot be sent between threads safely"
@@ -459,7 +459,7 @@ pub macro Copy($item:item) {
459459
/// [transmute]: crate::mem::transmute
460460
/// [nomicon-send-and-sync]: ../../nomicon/send-and-sync.html
461461
#[stable(feature = "rust1", since = "1.0.0")]
462-
#[cfg_attr(not(test), rustc_diagnostic_item = "sync_trait")]
462+
#[cfg_attr(not(test), rustc_diagnostic_item = "Sync")]
463463
#[lang = "sync"]
464464
#[rustc_on_unimplemented(
465465
message = "`{Self}` cannot be shared between threads safely",

core/src/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ use crate::{
509509

510510
/// The `Option` type. See [the module level documentation](self) for more.
511511
#[derive(Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
512-
#[rustc_diagnostic_item = "option_type"]
512+
#[rustc_diagnostic_item = "Option"]
513513
#[stable(feature = "rust1", since = "1.0.0")]
514514
pub enum Option<T> {
515515
/// No value

core/src/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ use crate::{convert, fmt, hint};
498498
/// See the [module documentation](self) for details.
499499
#[derive(Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
500500
#[must_use = "this `Result` may be an `Err` variant, which should be handled"]
501-
#[rustc_diagnostic_item = "result_type"]
501+
#[rustc_diagnostic_item = "Result"]
502502
#[stable(feature = "rust1", since = "1.0.0")]
503503
pub enum Result<T, E> {
504504
/// Contains the success value

std/src/collections/hash/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ use crate::sys;
203203
/// }
204204
/// ```
205205
206-
#[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_type")]
206+
#[cfg_attr(not(test), rustc_diagnostic_item = "HashMap")]
207207
#[stable(feature = "rust1", since = "1.0.0")]
208208
#[rustc_insignificant_dtor]
209209
pub struct HashMap<K, V, S = RandomState> {

std/src/collections/hash/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ use super::map::{map_try_reserve_error, RandomState};
107107
/// [`HashMap`]: crate::collections::HashMap
108108
/// [`RefCell`]: crate::cell::RefCell
109109
/// [`Cell`]: crate::cell::Cell
110-
#[cfg_attr(not(test), rustc_diagnostic_item = "hashset_type")]
110+
#[cfg_attr(not(test), rustc_diagnostic_item = "HashSet")]
111111
#[stable(feature = "rust1", since = "1.0.0")]
112112
pub struct HashSet<T, S = RandomState> {
113113
base: base::HashSet<T, S>,

0 commit comments

Comments
 (0)