@@ -1475,7 +1475,7 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
1475
1475
/// assert_eq!(arr[1..3], [ 1,2 ]);
1476
1476
/// }
1477
1477
/// ```
1478
- #[ derive( Copy , Clone , PartialEq , Eq ) ]
1478
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash ) ]
1479
1479
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1480
1480
pub struct RangeFull ;
1481
1481
@@ -1506,7 +1506,7 @@ impl fmt::Debug for RangeFull {
1506
1506
/// assert_eq!(arr[1..3], [ 1,2 ]); // Range
1507
1507
/// }
1508
1508
/// ```
1509
- #[ derive( Clone , PartialEq , Eq ) ]
1509
+ #[ derive( Clone , PartialEq , Eq , Hash ) ] // not Copy -- see #27186
1510
1510
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1511
1511
pub struct Range < Idx > {
1512
1512
/// The lower bound of the range (inclusive).
@@ -1570,7 +1570,7 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
1570
1570
/// assert_eq!(arr[1..3], [ 1,2 ]);
1571
1571
/// }
1572
1572
/// ```
1573
- #[ derive( Clone , PartialEq , Eq ) ]
1573
+ #[ derive( Clone , PartialEq , Eq , Hash ) ] // not Copy -- see #27186
1574
1574
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1575
1575
pub struct RangeFrom < Idx > {
1576
1576
/// The lower bound of the range (inclusive).
@@ -1619,7 +1619,7 @@ impl<Idx: PartialOrd<Idx>> RangeFrom<Idx> {
1619
1619
/// assert_eq!(arr[1..3], [ 1,2 ]);
1620
1620
/// }
1621
1621
/// ```
1622
- #[ derive( Copy , Clone , PartialEq , Eq ) ]
1622
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash ) ]
1623
1623
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1624
1624
pub struct RangeTo < Idx > {
1625
1625
/// The upper bound of the range (exclusive).
@@ -1669,7 +1669,7 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
1669
1669
/// assert_eq!(arr[1...2], [ 1,2 ]); // RangeInclusive
1670
1670
/// }
1671
1671
/// ```
1672
- #[ derive( Copy , Clone , PartialEq , Eq ) ]
1672
+ #[ derive( Clone , PartialEq , Eq , Hash ) ] // not Copy -- see #27186
1673
1673
#[ unstable( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237" ) ]
1674
1674
pub enum RangeInclusive < Idx > {
1675
1675
/// Empty range (iteration has finished)
@@ -1774,7 +1774,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
1774
1774
/// assert_eq!(arr[1...2], [ 1,2 ]);
1775
1775
/// }
1776
1776
/// ```
1777
- #[ derive( Copy , Clone , PartialEq , Eq ) ]
1777
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash ) ]
1778
1778
#[ unstable( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237" ) ]
1779
1779
pub struct RangeToInclusive < Idx > {
1780
1780
/// The upper bound of the range (inclusive)
0 commit comments