about summary refs log tree commit diff
path: root/compiler/rustc_index_macros
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-12-31 18:35:49 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-06-30 16:42:53 +0000
commitf23c1fdaeba6a1c8237996ae2efecaf938ba9ef8 (patch)
tree44c753560f3747a99af4456de5b1741b5a877fcd /compiler/rustc_index_macros
parent2975a21b5d6e4718cf219349d3cb37d45c20f84d (diff)
downloadrust-f23c1fdaeba6a1c8237996ae2efecaf938ba9ef8.tar.gz
rust-f23c1fdaeba6a1c8237996ae2efecaf938ba9ef8.zip
Remove usage of specialization from newtype_index!
Diffstat (limited to 'compiler/rustc_index_macros')
-rw-r--r--compiler/rustc_index_macros/src/lib.rs5
-rw-r--r--compiler/rustc_index_macros/src/newtype.rs4
2 files changed, 1 insertions, 8 deletions
diff --git a/compiler/rustc_index_macros/src/lib.rs b/compiler/rustc_index_macros/src/lib.rs
index 3e55dd82a6e..2b444932f85 100644
--- a/compiler/rustc_index_macros/src/lib.rs
+++ b/compiler/rustc_index_macros/src/lib.rs
@@ -34,10 +34,7 @@ mod newtype;
 ///   optimizations. The default max value is 0xFFFF_FF00.
 /// - `#[gate_rustc_only]`: makes parts of the generated code nightly-only.
 #[proc_macro]
-#[cfg_attr(
-    feature = "nightly",
-    allow_internal_unstable(step_trait, rustc_attrs, trusted_step, min_specialization)
-)]
+#[cfg_attr(feature = "nightly", allow_internal_unstable(step_trait, rustc_attrs, trusted_step))]
 pub fn newtype_index(input: TokenStream) -> TokenStream {
     newtype::newtype(input)
 }
diff --git a/compiler/rustc_index_macros/src/newtype.rs b/compiler/rustc_index_macros/src/newtype.rs
index 41863f7b15f..1ac2c44e9dc 100644
--- a/compiler/rustc_index_macros/src/newtype.rs
+++ b/compiler/rustc_index_macros/src/newtype.rs
@@ -139,10 +139,6 @@ impl Parse for Newtype {
                         Self::index(start).checked_sub(u).map(Self::from_usize)
                     }
                 }
-
-                // Safety: The implementation of `Step` upholds all invariants.
-                #gate_rustc_only
-                unsafe impl ::std::iter::TrustedStep for #name {}
             }
         } else {
             quote! {}