Remove usage of specialization from newtype_index!
This commit is contained in:
parent
2975a21b5d
commit
f23c1fdaeb
@ -1,10 +1,7 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(all(feature = "nightly", test), feature(stmt_expr_attributes))]
|
#![cfg_attr(all(feature = "nightly", test), feature(stmt_expr_attributes))]
|
||||||
#![cfg_attr(
|
|
||||||
feature = "nightly",
|
|
||||||
feature(extend_one, min_specialization, new_uninit, step_trait, test)
|
|
||||||
)]
|
|
||||||
#![cfg_attr(feature = "nightly", allow(internal_features))]
|
#![cfg_attr(feature = "nightly", allow(internal_features))]
|
||||||
|
#![cfg_attr(feature = "nightly", feature(extend_one, new_uninit, step_trait, test))]
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
|
|
||||||
pub mod bit_set;
|
pub mod bit_set;
|
||||||
|
@ -34,10 +34,7 @@
|
|||||||
/// optimizations. The default max value is 0xFFFF_FF00.
|
/// optimizations. The default max value is 0xFFFF_FF00.
|
||||||
/// - `#[gate_rustc_only]`: makes parts of the generated code nightly-only.
|
/// - `#[gate_rustc_only]`: makes parts of the generated code nightly-only.
|
||||||
#[proc_macro]
|
#[proc_macro]
|
||||||
#[cfg_attr(
|
#[cfg_attr(feature = "nightly", allow_internal_unstable(step_trait, rustc_attrs, trusted_step))]
|
||||||
feature = "nightly",
|
|
||||||
allow_internal_unstable(step_trait, rustc_attrs, trusted_step, min_specialization)
|
|
||||||
)]
|
|
||||||
pub fn newtype_index(input: TokenStream) -> TokenStream {
|
pub fn newtype_index(input: TokenStream) -> TokenStream {
|
||||||
newtype::newtype(input)
|
newtype::newtype(input)
|
||||||
}
|
}
|
||||||
|
@ -139,10 +139,6 @@ fn backward_checked(start: Self, u: usize) -> Option<Self> {
|
|||||||
Self::index(start).checked_sub(u).map(Self::from_usize)
|
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 {
|
} else {
|
||||||
quote! {}
|
quote! {}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#![allow(rustc::usage_of_ty_tykind)]
|
#![allow(rustc::usage_of_ty_tykind)]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "nightly",
|
feature = "nightly",
|
||||||
feature(associated_type_defaults, min_specialization, never_type, rustc_attrs, negative_impls)
|
feature(associated_type_defaults, never_type, rustc_attrs, negative_impls)
|
||||||
)]
|
)]
|
||||||
#![cfg_attr(feature = "nightly", allow(internal_features))]
|
#![cfg_attr(feature = "nightly", allow(internal_features))]
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
|
Loading…
Reference in New Issue
Block a user