Skip to content

Commit 409c3ce

Browse files
committed
Remove unused diagnostic items
1 parent 3be81dd commit 409c3ce

File tree

6 files changed

+0
-38
lines changed

6 files changed

+0
-38
lines changed

compiler/rustc_span/src/symbol.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@ symbols! {
190190
Error,
191191
File,
192192
FileType,
193-
Fn,
194-
FnMut,
195-
FnOnce,
196193
FormatSpec,
197194
Formatter,
198195
From,
@@ -462,7 +459,6 @@ symbols! {
462459
cfg_doctest,
463460
cfg_eval,
464461
cfg_hide,
465-
cfg_macro,
466462
cfg_panic,
467463
cfg_sanitize,
468464
cfg_target_abi,
@@ -495,19 +491,16 @@ symbols! {
495491
cold,
496492
collapse_debuginfo,
497493
column,
498-
column_macro,
499494
compare_and_swap,
500495
compare_exchange,
501496
compare_exchange_weak,
502497
compile_error,
503-
compile_error_macro,
504498
compiler,
505499
compiler_builtins,
506500
compiler_fence,
507501
concat,
508502
concat_bytes,
509503
concat_idents,
510-
concat_macro,
511504
conservative_impl_trait,
512505
console,
513506
const_allocate,
@@ -724,7 +717,6 @@ symbols! {
724717
field,
725718
field_init_shorthand,
726719
file,
727-
file_macro,
728720
fill,
729721
finish,
730722
flags,
@@ -826,7 +818,6 @@ symbols! {
826818
include,
827819
include_bytes,
828820
include_bytes_macro,
829-
include_macro,
830821
include_str,
831822
include_str_macro,
832823
inclusive_range_syntax,
@@ -881,7 +872,6 @@ symbols! {
881872
lifetimes,
882873
likely,
883874
line,
884-
line_macro,
885875
link,
886876
link_args,
887877
link_cfg,
@@ -926,7 +916,6 @@ symbols! {
926916
masked,
927917
match_beginning_vert,
928918
match_default_bindings,
929-
matches_macro,
930919
maxnumf32,
931920
maxnumf64,
932921
may_dangle,
@@ -965,7 +954,6 @@ symbols! {
965954
modifiers,
966955
module,
967956
module_path,
968-
module_path_macro,
969957
more_qualified_paths,
970958
more_struct_aliases,
971959
movbe_target_feature,
@@ -1103,7 +1091,6 @@ symbols! {
11031091
plugins,
11041092
pointee_trait,
11051093
pointer,
1106-
pointer_trait_fmt,
11071094
poll,
11081095
position,
11091096
post_dash_lto: "post-lto",
@@ -1449,7 +1436,6 @@ symbols! {
14491436
str_trim_start,
14501437
strict_provenance,
14511438
stringify,
1452-
stringify_macro,
14531439
struct_field_attributes,
14541440
struct_inherit,
14551441
struct_variant,
@@ -1568,7 +1554,6 @@ symbols! {
15681554
unreachable_2015,
15691555
unreachable_2015_macro,
15701556
unreachable_2021,
1571-
unreachable_2021_macro,
15721557
unreachable_code,
15731558
unreachable_display,
15741559
unreachable_macro,

library/core/src/fmt/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,6 @@ pub trait UpperHex {
10541054
pub trait Pointer {
10551055
/// Formats the value using the given formatter.
10561056
#[stable(feature = "rust1", since = "1.0.0")]
1057-
#[rustc_diagnostic_item = "pointer_trait_fmt"]
10581057
fn fmt(&self, f: &mut Formatter<'_>) -> Result;
10591058
}
10601059

library/core/src/macros/mod.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ pub macro debug_assert_matches($($arg:tt)*) {
338338
/// ```
339339
#[macro_export]
340340
#[stable(feature = "matches_macro", since = "1.42.0")]
341-
#[cfg_attr(not(test), rustc_diagnostic_item = "matches_macro")]
342341
macro_rules! matches {
343342
($expression:expr, $(|)? $( $pattern:pat_param )|+ $( if $guard: expr )? $(,)?) => {
344343
match $expression {
@@ -820,7 +819,6 @@ pub(crate) mod builtin {
820819
#[stable(feature = "compile_error_macro", since = "1.20.0")]
821820
#[rustc_builtin_macro]
822821
#[macro_export]
823-
#[cfg_attr(not(test), rustc_diagnostic_item = "compile_error_macro")]
824822
macro_rules! compile_error {
825823
($msg:expr $(,)?) => {{ /* compiler built-in */ }};
826824
}
@@ -944,7 +942,6 @@ pub(crate) mod builtin {
944942
#[stable(feature = "rust1", since = "1.0.0")]
945943
#[rustc_builtin_macro]
946944
#[macro_export]
947-
#[cfg_attr(not(test), rustc_diagnostic_item = "env_macro")]
948945
macro_rules! env {
949946
($name:expr $(,)?) => {{ /* compiler built-in */ }};
950947
($name:expr, $error_msg:expr $(,)?) => {{ /* compiler built-in */ }};
@@ -973,7 +970,6 @@ pub(crate) mod builtin {
973970
#[stable(feature = "rust1", since = "1.0.0")]
974971
#[rustc_builtin_macro]
975972
#[macro_export]
976-
#[cfg_attr(not(test), rustc_diagnostic_item = "option_env_macro")]
977973
macro_rules! option_env {
978974
($name:expr $(,)?) => {{ /* compiler built-in */ }};
979975
}
@@ -1058,7 +1054,6 @@ pub(crate) mod builtin {
10581054
#[stable(feature = "rust1", since = "1.0.0")]
10591055
#[rustc_builtin_macro]
10601056
#[macro_export]
1061-
#[cfg_attr(not(test), rustc_diagnostic_item = "concat_macro")]
10621057
macro_rules! concat {
10631058
($($e:expr),* $(,)?) => {{ /* compiler built-in */ }};
10641059
}
@@ -1084,7 +1079,6 @@ pub(crate) mod builtin {
10841079
#[stable(feature = "rust1", since = "1.0.0")]
10851080
#[rustc_builtin_macro]
10861081
#[macro_export]
1087-
#[cfg_attr(not(test), rustc_diagnostic_item = "line_macro")]
10881082
macro_rules! line {
10891083
() => {
10901084
/* compiler built-in */
@@ -1124,7 +1118,6 @@ pub(crate) mod builtin {
11241118
#[stable(feature = "rust1", since = "1.0.0")]
11251119
#[rustc_builtin_macro]
11261120
#[macro_export]
1127-
#[cfg_attr(not(test), rustc_diagnostic_item = "column_macro")]
11281121
macro_rules! column {
11291122
() => {
11301123
/* compiler built-in */
@@ -1150,7 +1143,6 @@ pub(crate) mod builtin {
11501143
#[stable(feature = "rust1", since = "1.0.0")]
11511144
#[rustc_builtin_macro]
11521145
#[macro_export]
1153-
#[cfg_attr(not(test), rustc_diagnostic_item = "file_macro")]
11541146
macro_rules! file {
11551147
() => {
11561148
/* compiler built-in */
@@ -1175,7 +1167,6 @@ pub(crate) mod builtin {
11751167
#[stable(feature = "rust1", since = "1.0.0")]
11761168
#[rustc_builtin_macro]
11771169
#[macro_export]
1178-
#[cfg_attr(not(test), rustc_diagnostic_item = "stringify_macro")]
11791170
macro_rules! stringify {
11801171
($($t:tt)*) => {
11811172
/* compiler built-in */
@@ -1282,7 +1273,6 @@ pub(crate) mod builtin {
12821273
#[stable(feature = "rust1", since = "1.0.0")]
12831274
#[rustc_builtin_macro]
12841275
#[macro_export]
1285-
#[cfg_attr(not(test), rustc_diagnostic_item = "module_path_macro")]
12861276
macro_rules! module_path {
12871277
() => {
12881278
/* compiler built-in */
@@ -1316,7 +1306,6 @@ pub(crate) mod builtin {
13161306
#[stable(feature = "rust1", since = "1.0.0")]
13171307
#[rustc_builtin_macro]
13181308
#[macro_export]
1319-
#[cfg_attr(not(test), rustc_diagnostic_item = "cfg_macro")]
13201309
macro_rules! cfg {
13211310
($($cfg:tt)*) => {
13221311
/* compiler built-in */
@@ -1367,7 +1356,6 @@ pub(crate) mod builtin {
13671356
#[stable(feature = "rust1", since = "1.0.0")]
13681357
#[rustc_builtin_macro]
13691358
#[macro_export]
1370-
#[cfg_attr(not(test), rustc_diagnostic_item = "include_macro")]
13711359
macro_rules! include {
13721360
($file:expr $(,)?) => {{ /* compiler built-in */ }};
13731361
}

library/core/src/ops/function.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ use crate::marker::Tuple;
5757
#[cfg(bootstrap)]
5858
#[lang = "fn"]
5959
#[stable(feature = "rust1", since = "1.0.0")]
60-
#[rustc_diagnostic_item = "Fn"]
6160
#[rustc_paren_sugar]
6261
#[rustc_on_unimplemented(
6362
on(
@@ -137,7 +136,6 @@ pub trait Fn<Args>: FnMut<Args> {
137136
#[cfg(not(bootstrap))]
138137
#[lang = "fn"]
139138
#[stable(feature = "rust1", since = "1.0.0")]
140-
#[rustc_diagnostic_item = "Fn"]
141139
#[rustc_paren_sugar]
142140
#[rustc_on_unimplemented(
143141
on(
@@ -226,7 +224,6 @@ pub trait Fn<Args: Tuple>: FnMut<Args> {
226224
#[cfg(bootstrap)]
227225
#[lang = "fn_mut"]
228226
#[stable(feature = "rust1", since = "1.0.0")]
229-
#[rustc_diagnostic_item = "FnMut"]
230227
#[rustc_paren_sugar]
231228
#[rustc_on_unimplemented(
232229
on(
@@ -314,7 +311,6 @@ pub trait FnMut<Args>: FnOnce<Args> {
314311
#[cfg(not(bootstrap))]
315312
#[lang = "fn_mut"]
316313
#[stable(feature = "rust1", since = "1.0.0")]
317-
#[rustc_diagnostic_item = "FnMut"]
318314
#[rustc_paren_sugar]
319315
#[rustc_on_unimplemented(
320316
on(
@@ -395,7 +391,6 @@ pub trait FnMut<Args: Tuple>: FnOnce<Args> {
395391
#[cfg(bootstrap)]
396392
#[lang = "fn_once"]
397393
#[stable(feature = "rust1", since = "1.0.0")]
398-
#[rustc_diagnostic_item = "FnOnce"]
399394
#[rustc_paren_sugar]
400395
#[rustc_on_unimplemented(
401396
on(
@@ -480,7 +475,6 @@ pub trait FnOnce<Args> {
480475
#[cfg(not(bootstrap))]
481476
#[lang = "fn_once"]
482477
#[stable(feature = "rust1", since = "1.0.0")]
483-
#[rustc_diagnostic_item = "FnOnce"]
484478
#[rustc_paren_sugar]
485479
#[rustc_on_unimplemented(
486480
on(

library/core/src/panic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ pub macro panic_2015 {
4343
#[doc(hidden)]
4444
#[unstable(feature = "edition_panic", issue = "none", reason = "use panic!() instead")]
4545
#[allow_internal_unstable(core_panic, const_format_args)]
46-
#[rustc_diagnostic_item = "core_panic_2021_macro"]
4746
#[rustc_macro_transparency = "semitransparent"]
4847
pub macro panic_2021 {
4948
() => (
@@ -80,7 +79,6 @@ pub macro unreachable_2015 {
8079
#[doc(hidden)]
8180
#[unstable(feature = "edition_panic", issue = "none", reason = "use unreachable!() instead")]
8281
#[allow_internal_unstable(core_panic)]
83-
#[rustc_diagnostic_item = "unreachable_2021_macro"]
8482
#[rustc_macro_transparency = "semitransparent"]
8583
pub macro unreachable_2021 {
8684
() => (

library/std/src/net/ip_addr.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ pub enum IpAddr {
7373
/// assert!("0xcb.0x0.0x71.0x00".parse::<Ipv4Addr>().is_err()); // all octets are in hex
7474
/// ```
7575
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
76-
#[cfg_attr(not(test), rustc_diagnostic_item = "Ipv4Addr")]
7776
#[stable(feature = "rust1", since = "1.0.0")]
7877
pub struct Ipv4Addr {
7978
octets: [u8; 4],
@@ -156,7 +155,6 @@ pub struct Ipv4Addr {
156155
/// assert_eq!(localhost.is_loopback(), true);
157156
/// ```
158157
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
159-
#[cfg_attr(not(test), rustc_diagnostic_item = "Ipv6Addr")]
160158
#[stable(feature = "rust1", since = "1.0.0")]
161159
pub struct Ipv6Addr {
162160
octets: [u8; 16],

0 commit comments

Comments
 (0)