From 148c63e269db5ca7d7b1bd1a141f0f15c0594d72 Mon Sep 17 00:00:00 2001
From: Peter Jaszkowiak
Date: Mon, 27 Jan 2025 13:32:10 -0700
Subject: [PATCH] implement unstable `new_range` feature
for RFC 3550, tracking issue #123741
---
core/src/range.rs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/core/src/range.rs b/core/src/range.rs
index 427526fd14b91..6a62928873fe8 100644
--- a/core/src/range.rs
+++ b/core/src/range.rs
@@ -48,6 +48,7 @@ pub use crate::ops::{Bound, OneSidedRange, RangeBounds, RangeFull, RangeTo, Rang
/// assert_eq!(Range::from(3..5), Range { start: 3, end: 5 });
/// assert_eq!(3 + 4 + 5, Range::from(3..6).into_iter().sum());
/// ```
+#[cfg_attr(not(bootstrap), lang = "RangeCopy")]
#[derive(Clone, Copy, Default, PartialEq, Eq, Hash)]
#[unstable(feature = "new_range_api", issue = "125687")]
pub struct Range {
@@ -205,6 +206,7 @@ impl From> for Range {
/// assert_eq!(RangeInclusive::from(3..=5), RangeInclusive { start: 3, end: 5 });
/// assert_eq!(3 + 4 + 5, RangeInclusive::from(3..=5).into_iter().sum());
/// ```
+#[cfg_attr(not(bootstrap), lang = "RangeInclusiveCopy")]
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[unstable(feature = "new_range_api", issue = "125687")]
pub struct RangeInclusive {
@@ -388,6 +390,7 @@ impl From> for RangeInclusive {
/// assert_eq!(RangeFrom::from(2..), core::range::RangeFrom { start: 2 });
/// assert_eq!(2 + 3 + 4, RangeFrom::from(2..).into_iter().take(3).sum());
/// ```
+#[cfg_attr(not(bootstrap), lang = "RangeFromCopy")]
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[unstable(feature = "new_range_api", issue = "125687")]
pub struct RangeFrom {