Skip to content

Commit f23c1fd

Browse files
committed
Remove usage of specialization from newtype_index!
1 parent 2975a21 commit f23c1fd

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

compiler/rustc_index/src/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// tidy-alphabetical-start
22
#![cfg_attr(all(feature = "nightly", test), feature(stmt_expr_attributes))]
3-
#![cfg_attr(
4-
feature = "nightly",
5-
feature(extend_one, min_specialization, new_uninit, step_trait, test)
6-
)]
73
#![cfg_attr(feature = "nightly", allow(internal_features))]
4+
#![cfg_attr(feature = "nightly", feature(extend_one, new_uninit, step_trait, test))]
85
// tidy-alphabetical-end
96

107
pub mod bit_set;

compiler/rustc_index_macros/src/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ mod newtype;
3434
/// optimizations. The default max value is 0xFFFF_FF00.
3535
/// - `#[gate_rustc_only]`: makes parts of the generated code nightly-only.
3636
#[proc_macro]
37-
#[cfg_attr(
38-
feature = "nightly",
39-
allow_internal_unstable(step_trait, rustc_attrs, trusted_step, min_specialization)
40-
)]
37+
#[cfg_attr(feature = "nightly", allow_internal_unstable(step_trait, rustc_attrs, trusted_step))]
4138
pub fn newtype_index(input: TokenStream) -> TokenStream {
4239
newtype::newtype(input)
4340
}

compiler/rustc_index_macros/src/newtype.rs

-4
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,6 @@ impl Parse for Newtype {
139139
Self::index(start).checked_sub(u).map(Self::from_usize)
140140
}
141141
}
142-
143-
// Safety: The implementation of `Step` upholds all invariants.
144-
#gate_rustc_only
145-
unsafe impl ::std::iter::TrustedStep for #name {}
146142
}
147143
} else {
148144
quote! {}

compiler/rustc_type_ir/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(rustc::usage_of_ty_tykind)]
33
#![cfg_attr(
44
feature = "nightly",
5-
feature(associated_type_defaults, min_specialization, never_type, rustc_attrs, negative_impls)
5+
feature(associated_type_defaults, never_type, rustc_attrs, negative_impls)
66
)]
77
#![cfg_attr(feature = "nightly", allow(internal_features))]
88
// tidy-alphabetical-end

0 commit comments

Comments
 (0)