mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Apply replace-version-placeholder
This commit is contained in:
@@ -234,7 +234,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
/// Implementation details of externally implementable items
|
||||
(internal, eii_internals, "1.94.0", None),
|
||||
/// Implementation details of field representing types.
|
||||
(internal, field_representing_type_raw, "CURRENT_RUSTC_VERSION", None),
|
||||
(internal, field_representing_type_raw, "1.96.0", None),
|
||||
/// Outputs useful `assert!` messages
|
||||
(unstable, generic_assert, "1.63.0", None),
|
||||
/// Allows using the #[rustc_intrinsic] attribute.
|
||||
@@ -258,7 +258,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
/// Allows using the `#[stable]` and `#[unstable]` attributes.
|
||||
(internal, staged_api, "1.0.0", None),
|
||||
/// Perma-unstable, only used to test the `incomplete_features` lint.
|
||||
(incomplete, test_incomplete_feature, "CURRENT_RUSTC_VERSION", None),
|
||||
(incomplete, test_incomplete_feature, "1.96.0", None),
|
||||
/// Added for testing unstable lints; perma-unstable.
|
||||
(internal, test_unstable_lint, "1.60.0", None),
|
||||
/// Use for stable + negative coherence and strict coherence depending on trait's
|
||||
@@ -475,9 +475,9 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
/// Allows giving non-const impls custom diagnostic messages if attempted to be used as const
|
||||
(unstable, diagnostic_on_const, "1.93.0", Some(143874)),
|
||||
/// Allows giving on-move borrowck custom diagnostic messages for a type
|
||||
(unstable, diagnostic_on_move, "CURRENT_RUSTC_VERSION", Some(154181)),
|
||||
(unstable, diagnostic_on_move, "1.96.0", Some(154181)),
|
||||
/// Allows giving unresolved imports a custom diagnostic message
|
||||
(unstable, diagnostic_on_unknown, "CURRENT_RUSTC_VERSION", Some(152900)),
|
||||
(unstable, diagnostic_on_unknown, "1.96.0", Some(152900)),
|
||||
/// Allows `#[doc(cfg(...))]`.
|
||||
(unstable, doc_cfg, "1.21.0", Some(43781)),
|
||||
/// Allows `#[doc(masked)]`.
|
||||
@@ -509,7 +509,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
/// Allows the use of `#[ffi_pure]` on foreign functions.
|
||||
(unstable, ffi_pure, "1.45.0", Some(58329)),
|
||||
/// Experimental field projections.
|
||||
(incomplete, field_projections, "CURRENT_RUSTC_VERSION", Some(145383)),
|
||||
(incomplete, field_projections, "1.96.0", Some(145383)),
|
||||
/// Allows marking trait functions as `final` to prevent overriding impls
|
||||
(unstable, final_associated_functions, "1.95.0", Some(131179)),
|
||||
/// Controlling the behavior of fmt::Debug
|
||||
@@ -543,7 +543,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
/// Target features on hexagon.
|
||||
(unstable, hexagon_target_feature, "1.27.0", Some(150250)),
|
||||
/// Allows `impl(crate) trait Foo` restrictions.
|
||||
(incomplete, impl_restriction, "CURRENT_RUSTC_VERSION", Some(105077)),
|
||||
(incomplete, impl_restriction, "1.96.0", Some(105077)),
|
||||
/// Allows `impl Trait` to be used inside associated types (RFC 2515).
|
||||
(unstable, impl_trait_in_assoc_type, "1.70.0", Some(63063)),
|
||||
/// Allows `impl Trait` in bindings (`let`).
|
||||
@@ -576,7 +576,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
/// Allow `macro_rules!` derive rules
|
||||
(unstable, macro_derive, "1.91.0", Some(143549)),
|
||||
/// Allow `$x:guard` matcher in macros
|
||||
(unstable, macro_guard_matcher, "CURRENT_RUSTC_VERSION", Some(153104)),
|
||||
(unstable, macro_guard_matcher, "1.96.0", Some(153104)),
|
||||
/// Give access to additional metadata about declarative macro meta-variables.
|
||||
(unstable, macro_metavar_expr, "1.61.0", Some(83527)),
|
||||
/// Provides a way to concatenate identifiers using metavariable expressions.
|
||||
@@ -587,7 +587,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
(incomplete, mgca_type_const_syntax, "1.95.0", Some(132980)),
|
||||
/// Allows additional const parameter types, such as [u8; 10] or user defined types.
|
||||
/// User defined types must not have fields more private than the type itself.
|
||||
(unstable, min_adt_const_params, "CURRENT_RUSTC_VERSION", Some(154042)),
|
||||
(unstable, min_adt_const_params, "1.96.0", Some(154042)),
|
||||
/// Enables the generic const args MVP (only bare paths, not arbitrary computation).
|
||||
(incomplete, min_generic_const_args, "1.84.0", Some(132980)),
|
||||
/// A minimal, sound subset of specialization intended to be used by the
|
||||
|
||||
@@ -367,7 +367,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "from_wrapper_impls", since = "1.96.0")]
|
||||
impl<T, F> From<T> for LazyCell<T, F> {
|
||||
/// Constructs a `LazyCell` that starts already initialized
|
||||
/// with the provided value.
|
||||
|
||||
@@ -716,7 +716,7 @@ fn index(&self, index: ops::RangeFrom<usize>) -> &CStr {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
impl ops::Index<range::RangeFrom<usize>> for CStr {
|
||||
type Output = CStr;
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ pub const fn as_usize(self) -> usize {
|
||||
/// Returns the alignment as a <code>[NonZero]<[usize]></code>.
|
||||
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
|
||||
#[deprecated(
|
||||
since = "CURRENT_RUSTC_VERSION",
|
||||
since = "1.96.0",
|
||||
note = "renamed to `as_nonzero_usize`",
|
||||
suggestion = "as_nonzero_usize"
|
||||
)]
|
||||
|
||||
@@ -262,8 +262,8 @@ pub const fn break_value(self) -> Option<B>
|
||||
/// assert_eq!(res, Ok(&5));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "control_flow_ok", since = "1.96.0")]
|
||||
#[rustc_const_stable(feature = "control_flow_ok", since = "1.96.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
|
||||
pub const fn break_ok(self) -> Result<B, C> {
|
||||
match self {
|
||||
@@ -374,8 +374,8 @@ pub const fn continue_value(self) -> Option<C>
|
||||
/// assert_eq!(res, Err("too big value detected"));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "control_flow_ok", since = "1.96.0")]
|
||||
#[rustc_const_stable(feature = "control_flow_ok", since = "1.96.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
|
||||
pub const fn continue_ok(self) -> Result<C, B> {
|
||||
match self {
|
||||
|
||||
@@ -317,7 +317,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
|
||||
/// If a value's type is already `UnwindSafe`,
|
||||
/// wrapping it in `AssertUnwindSafe` is never incorrect.
|
||||
#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "from_wrapper_impls", since = "1.96.0")]
|
||||
impl<T> From<T> for AssertUnwindSafe<T>
|
||||
where
|
||||
T: UnwindSafe,
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
use crate::{fmt, hash, intrinsics, ub_checks};
|
||||
|
||||
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
|
||||
#[deprecated(since = "CURRENT_RUSTC_VERSION", note = "moved from `ptr` to `mem`")]
|
||||
#[deprecated(since = "1.96.0", note = "moved from `ptr` to `mem`")]
|
||||
/// Deprecated re-export of [mem::Alignment].
|
||||
pub type Alignment = mem::Alignment;
|
||||
|
||||
|
||||
+30
-30
@@ -24,13 +24,13 @@
|
||||
pub mod legacy;
|
||||
|
||||
#[doc(inline)]
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
pub use iter::RangeFromIter;
|
||||
#[doc(inline)]
|
||||
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
|
||||
pub use iter::RangeInclusiveIter;
|
||||
#[doc(inline)]
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
pub use iter::RangeIter;
|
||||
|
||||
// FIXME(#125687): re-exports temporarily removed
|
||||
@@ -68,17 +68,17 @@
|
||||
#[lang = "RangeCopy"]
|
||||
#[derive(Copy, Hash)]
|
||||
#[derive_const(Clone, Default, PartialEq, Eq)]
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
pub struct Range<Idx> {
|
||||
/// The lower bound of the range (inclusive).
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
pub start: Idx,
|
||||
/// The upper bound of the range (exclusive).
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
pub end: Idx,
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
impl<Idx: fmt::Debug> fmt::Debug for Range<Idx> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.start.fmt(fmt)?;
|
||||
@@ -103,7 +103,7 @@ impl<Idx: Step> Range<Idx> {
|
||||
/// assert_eq!(i.next(), Some(16));
|
||||
/// assert_eq!(i.next(), Some(25));
|
||||
/// ```
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[inline]
|
||||
pub fn iter(&self) -> RangeIter<Idx> {
|
||||
self.clone().into_iter()
|
||||
@@ -132,7 +132,7 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
|
||||
/// assert!(!Range::from(f32::NAN..1.0).contains(&0.5));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
pub const fn contains<U>(&self, item: &U) -> bool
|
||||
where
|
||||
@@ -164,7 +164,7 @@ pub const fn contains<U>(&self, item: &U) -> bool
|
||||
/// assert!( Range::from(f32::NAN..5.0).is_empty());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
pub const fn is_empty(&self) -> bool
|
||||
where
|
||||
@@ -174,7 +174,7 @@ pub const fn is_empty(&self) -> bool
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
impl<T> const RangeBounds<T> for Range<T> {
|
||||
fn start_bound(&self) -> Bound<&T> {
|
||||
@@ -191,7 +191,7 @@ fn end_bound(&self) -> Bound<&T> {
|
||||
/// If you need to use this implementation where `T` is unsized,
|
||||
/// consider using the `RangeBounds` impl for a 2-tuple of [`Bound<&T>`][Bound],
|
||||
/// i.e. replace `start..end` with `(Bound::Included(start), Bound::Excluded(end))`.
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
impl<T> const RangeBounds<T> for Range<&T> {
|
||||
fn start_bound(&self) -> Bound<&T> {
|
||||
@@ -210,7 +210,7 @@ fn into_bounds(self) -> (Bound<T>, Bound<T>) {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
|
||||
impl<T> const From<Range<T>> for legacy::Range<T> {
|
||||
#[inline]
|
||||
@@ -218,7 +218,7 @@ fn from(value: Range<T>) -> Self {
|
||||
Self { start: value.start, end: value.end }
|
||||
}
|
||||
}
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
|
||||
impl<T> const From<legacy::Range<T>> for Range<T> {
|
||||
#[inline]
|
||||
@@ -444,14 +444,14 @@ fn from(value: legacy::RangeInclusive<T>) -> Self {
|
||||
#[lang = "RangeFromCopy"]
|
||||
#[derive(Copy, Hash)]
|
||||
#[derive_const(Clone, PartialEq, Eq)]
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
pub struct RangeFrom<Idx> {
|
||||
/// The lower bound of the range (inclusive).
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
pub start: Idx,
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
impl<Idx: fmt::Debug> fmt::Debug for RangeFrom<Idx> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.start.fmt(fmt)?;
|
||||
@@ -475,7 +475,7 @@ impl<Idx: Step> RangeFrom<Idx> {
|
||||
/// assert_eq!(i.next(), Some(16));
|
||||
/// assert_eq!(i.next(), Some(25));
|
||||
/// ```
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[inline]
|
||||
pub fn iter(&self) -> RangeFromIter<Idx> {
|
||||
self.clone().into_iter()
|
||||
@@ -499,7 +499,7 @@ impl<Idx: PartialOrd<Idx>> RangeFrom<Idx> {
|
||||
/// assert!(!RangeFrom::from(f32::NAN..).contains(&0.5));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
pub const fn contains<U>(&self, item: &U) -> bool
|
||||
where
|
||||
@@ -510,7 +510,7 @@ pub const fn contains<U>(&self, item: &U) -> bool
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
impl<T> const RangeBounds<T> for RangeFrom<T> {
|
||||
fn start_bound(&self) -> Bound<&T> {
|
||||
@@ -527,7 +527,7 @@ fn end_bound(&self) -> Bound<&T> {
|
||||
/// If you need to use this implementation where `T` is unsized,
|
||||
/// consider using the `RangeBounds` impl for a 2-tuple of [`Bound<&T>`][Bound],
|
||||
/// i.e. replace `start..` with `(Bound::Included(start), Bound::Unbounded)`.
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
impl<T> const RangeBounds<T> for RangeFrom<&T> {
|
||||
fn start_bound(&self) -> Bound<&T> {
|
||||
@@ -557,7 +557,7 @@ fn bound(self) -> (OneSidedRangeBound, T) {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
|
||||
impl<T> const From<RangeFrom<T>> for legacy::RangeFrom<T> {
|
||||
#[inline]
|
||||
@@ -565,7 +565,7 @@ fn from(value: RangeFrom<T>) -> Self {
|
||||
Self { start: value.start }
|
||||
}
|
||||
}
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
|
||||
impl<T> const From<legacy::RangeFrom<T>> for RangeFrom<T> {
|
||||
#[inline]
|
||||
@@ -619,14 +619,14 @@ fn from(value: legacy::RangeFrom<T>) -> Self {
|
||||
#[lang = "RangeToInclusiveCopy"]
|
||||
#[doc(alias = "..=")]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
pub struct RangeToInclusive<Idx> {
|
||||
/// The upper bound of the range (inclusive)
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
pub last: Idx,
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
impl<Idx: fmt::Debug> fmt::Debug for RangeToInclusive<Idx> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(fmt, "..=")?;
|
||||
@@ -650,7 +650,7 @@ impl<Idx: PartialOrd<Idx>> RangeToInclusive<Idx> {
|
||||
/// assert!(!(..=f32::NAN).contains(&0.5));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
pub const fn contains<U>(&self, item: &U) -> bool
|
||||
where
|
||||
@@ -661,13 +661,13 @@ pub const fn contains<U>(&self, item: &U) -> bool
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
impl<T> From<legacy::RangeToInclusive<T>> for RangeToInclusive<T> {
|
||||
fn from(value: legacy::RangeToInclusive<T>) -> Self {
|
||||
Self { last: value.end }
|
||||
}
|
||||
}
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
impl<T> From<RangeToInclusive<T>> for legacy::RangeToInclusive<T> {
|
||||
fn from(value: RangeToInclusive<T>) -> Self {
|
||||
Self { end: value.last }
|
||||
@@ -677,7 +677,7 @@ fn from(value: RangeToInclusive<T>) -> Self {
|
||||
// RangeToInclusive<Idx> cannot impl From<RangeTo<Idx>>
|
||||
// because underflow would be possible with (..0).into()
|
||||
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
impl<T> const RangeBounds<T> for RangeToInclusive<T> {
|
||||
fn start_bound(&self) -> Bound<&T> {
|
||||
@@ -688,7 +688,7 @@ fn end_bound(&self) -> Bound<&T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_range", issue = "none")]
|
||||
impl<T> const RangeBounds<T> for RangeToInclusive<&T> {
|
||||
fn start_bound(&self) -> Bound<&T> {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
use crate::{intrinsics, mem};
|
||||
|
||||
/// By-value [`Range`] iterator.
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RangeIter<A>(legacy::Range<A>);
|
||||
|
||||
@@ -64,7 +64,7 @@ unsafe impl TrustedRandomAccessNoCoerce for RangeIter<$t> {
|
||||
u64 i64
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
impl<A: Step> Iterator for RangeIter<A> {
|
||||
type Item = A;
|
||||
|
||||
@@ -132,7 +132,7 @@ unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
impl<A: Step> DoubleEndedIterator for RangeIter<A> {
|
||||
#[inline]
|
||||
fn next_back(&mut self) -> Option<A> {
|
||||
@@ -153,10 +153,10 @@ fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
|
||||
#[unstable(feature = "trusted_len", issue = "37572")]
|
||||
unsafe impl<A: TrustedStep> TrustedLen for RangeIter<A> {}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
impl<A: Step> FusedIterator for RangeIter<A> {}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
impl<A: Step> IntoIterator for Range<A> {
|
||||
type Item = A;
|
||||
type IntoIter = RangeIter<A>;
|
||||
@@ -299,7 +299,7 @@ fn into_iter(self) -> Self::IntoIter {
|
||||
// since e.g. `(0..=u64::MAX).len()` would be `u64::MAX + 1`.
|
||||
macro_rules! range_exact_iter_impl {
|
||||
($($t:ty)*) => ($(
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
impl ExactSizeIterator for RangeIter<$t> { }
|
||||
)*)
|
||||
}
|
||||
@@ -322,7 +322,7 @@ impl ExactSizeIterator for RangeInclusiveIter<$t> { }
|
||||
}
|
||||
|
||||
/// By-value [`RangeFrom`] iterator.
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RangeFromIter<A> {
|
||||
start: A,
|
||||
@@ -361,7 +361,7 @@ pub fn remainder(self) -> RangeFrom<A> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
impl<A: Step> Iterator for RangeFromIter<A> {
|
||||
type Item = A;
|
||||
|
||||
@@ -432,10 +432,10 @@ fn nth(&mut self, n: usize) -> Option<A> {
|
||||
#[unstable(feature = "trusted_len", issue = "37572")]
|
||||
unsafe impl<A: TrustedStep> TrustedLen for RangeFromIter<A> {}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
impl<A: Step> FusedIterator for RangeFromIter<A> {}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
impl<A: Step> IntoIterator for RangeFrom<A> {
|
||||
type Item = A;
|
||||
type IntoIter = RangeFromIter<A>;
|
||||
|
||||
@@ -125,13 +125,13 @@ impl Sealed for ops::RangeToInclusive<usize> {}
|
||||
#[stable(feature = "slice_index_with_ops_bound_pair", since = "1.53.0")]
|
||||
impl Sealed for (ops::Bound<usize>, ops::Bound<usize>) {}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
impl Sealed for range::Range<usize> {}
|
||||
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
|
||||
impl Sealed for range::RangeInclusive<usize> {}
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
impl Sealed for range::RangeToInclusive<usize> {}
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
impl Sealed for range::RangeFrom<usize> {}
|
||||
|
||||
impl Sealed for ops::IndexRange {}
|
||||
@@ -458,7 +458,7 @@ fn index_mut(self, slice: &mut [T]) -> &mut [T] {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
|
||||
unsafe impl<T> const SliceIndex<[T]> for range::Range<usize> {
|
||||
type Output = [T];
|
||||
@@ -588,7 +588,7 @@ fn index_mut(self, slice: &mut [T]) -> &mut [T] {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
|
||||
unsafe impl<T> const SliceIndex<[T]> for range::RangeFrom<usize> {
|
||||
type Output = [T];
|
||||
@@ -801,7 +801,7 @@ fn index_mut(self, slice: &mut [T]) -> &mut [T] {
|
||||
}
|
||||
|
||||
/// The methods `index` and `index_mut` panic if the end of the range is out of bounds.
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
|
||||
unsafe impl<T> const SliceIndex<[T]> for range::RangeToInclusive<usize> {
|
||||
type Output = [T];
|
||||
|
||||
@@ -258,7 +258,7 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
|
||||
unsafe impl const SliceIndex<str> for range::Range<usize> {
|
||||
type Output = str;
|
||||
@@ -555,7 +555,7 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_from_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
|
||||
unsafe impl const SliceIndex<str> for range::RangeFrom<usize> {
|
||||
type Output = str;
|
||||
@@ -777,7 +777,7 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output {
|
||||
/// Panics if `last` does not point to the ending byte offset of a character
|
||||
/// (`last + 1` is either a starting byte offset as defined by
|
||||
/// `is_char_boundary`, or equal to `len`), or if `last >= len`.
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")]
|
||||
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
|
||||
unsafe impl const SliceIndex<str> for range::RangeToInclusive<usize> {
|
||||
type Output = str;
|
||||
|
||||
@@ -545,7 +545,7 @@
|
||||
pub use core::pin;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::ptr;
|
||||
#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_range_api", since = "1.96.0")]
|
||||
pub use core::range;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::result;
|
||||
|
||||
@@ -396,7 +396,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "from_wrapper_impls", since = "1.96.0")]
|
||||
impl<T, F> From<T> for LazyLock<T, F> {
|
||||
/// Constructs a `LazyLock` that starts already initialized
|
||||
/// with the provided value.
|
||||
|
||||
Reference in New Issue
Block a user