Skip to content

Commit 9e78cd7

Browse files
committed
make RangeInclusive Hash and !Copy
[breaking-change] due to the removal of Copy which shouldn't have been there in the first place, as per policy set forth in #27186.
1 parent 85e76e8 commit 9e78cd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
16691669
/// assert_eq!(arr[1...2], [ 1,2 ]); // RangeInclusive
16701670
/// }
16711671
/// ```
1672-
#[derive(Copy, Clone, PartialEq, Eq)]
1672+
#[derive(Clone, PartialEq, Eq, Hash)] // not Copy -- see #27186
16731673
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
16741674
pub enum RangeInclusive<Idx> {
16751675
/// Empty range (iteration has finished)

0 commit comments

Comments
 (0)