]> git.lizzy.rs Git - rust.git/commitdiff
Remove some Default impls
authorCaio <c410.f3r@gmail.com>
Fri, 10 Jul 2020 10:44:27 +0000 (07:44 -0300)
committerCaio <c410.f3r@gmail.com>
Fri, 10 Jul 2020 10:53:53 +0000 (07:53 -0300)
src/libcore/ops/range.rs

index 7422e5d720b4cf171d84300c4bbe915384ac0cf2..179038d1977c86ada516b1fce43454eb335c0fb5 100644 (file)
@@ -179,7 +179,7 @@ pub fn is_empty(&self) -> bool {
 ///
 /// [`Iterator`]: ../iter/trait.IntoIterator.html
 #[doc(alias = "..")]
-#[derive(Clone, Default, PartialEq, Eq, Hash)] // not Copy -- see #27186
+#[derive(Clone, PartialEq, Eq, Hash)] // not Copy -- see #27186
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct RangeFrom<Idx> {
     /// The lower bound of the range (inclusive).
@@ -261,7 +261,7 @@ pub fn contains<U>(&self, item: &U) -> bool
 /// [`Iterator`]: ../iter/trait.IntoIterator.html
 /// [slicing index]: ../slice/trait.SliceIndex.html
 #[doc(alias = "..")]
-#[derive(Copy, Clone, Default, PartialEq, Eq, Hash)]
+#[derive(Copy, Clone, PartialEq, Eq, Hash)]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct RangeTo<Idx> {
     /// The upper bound of the range (exclusive).
@@ -329,7 +329,7 @@ pub fn contains<U>(&self, item: &U) -> bool
 /// assert_eq!(arr[1..=3], [  1,2,3  ]);  // RangeInclusive
 /// ```
 #[doc(alias = "..=")]
-#[derive(Clone, Default, PartialEq, Eq, Hash)] // not Copy -- see #27186
+#[derive(Clone, PartialEq, Eq, Hash)] // not Copy -- see #27186
 #[stable(feature = "inclusive_range", since = "1.26.0")]
 pub struct RangeInclusive<Idx> {
     // Note that the fields here are not public to allow changing the
@@ -556,7 +556,7 @@ pub fn is_empty(&self) -> bool {
 /// [`Iterator`]: ../iter/trait.IntoIterator.html
 /// [slicing index]: ../slice/trait.SliceIndex.html
 #[doc(alias = "..=")]
-#[derive(Copy, Clone, Default, PartialEq, Eq, Hash)]
+#[derive(Copy, Clone, PartialEq, Eq, Hash)]
 #[stable(feature = "inclusive_range", since = "1.26.0")]
 pub struct RangeToInclusive<Idx> {
     /// The upper bound of the range (inclusive)