]> git.lizzy.rs Git - rust.git/commitdiff
make RangeInclusive Hash and !Copy
authorAlex Burka <durka42+github@gmail.com>
Thu, 9 Jun 2016 17:26:02 +0000 (13:26 -0400)
committerAlex Burka <durka42+github@gmail.com>
Thu, 9 Jun 2016 17:26:02 +0000 (13:26 -0400)
[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.

src/libcore/ops.rs

index 39f27bd47ba4c1adede37ebaa7c76c8c3c318abc..5e1210b2ff9bd3a6cb4fa9887127e36756731354 100644 (file)
@@ -1669,7 +1669,7 @@ pub fn contains(&self, item: Idx) -> bool {
 ///     assert_eq!(arr[1...2], [  1,2  ]);  // RangeInclusive
 /// }
 /// ```
-#[derive(Copy, Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq, Hash)]  // not Copy -- see #27186
 #[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
 pub enum RangeInclusive<Idx> {
     /// Empty range (iteration has finished)