diff options
| author | Matthew Piziak <matthew.piziak@gmail.com> | 2016-10-09 06:35:07 -0400 |
|---|---|---|
| committer | Matthew Piziak <matthew.piziak@gmail.com> | 2016-10-09 06:35:07 -0400 |
| commit | dc607deac7293e9fa767248fa2613f65a8c6a849 (patch) | |
| tree | d919d55770946f20e9250a57382f4ef52647ff55 | |
| parent | 19fd7fcce90fe41edd4a25f1f9d3cd90d7e285bb (diff) | |
| download | rust-dc607deac7293e9fa767248fa2613f65a8c6a849.tar.gz rust-dc607deac7293e9fa767248fa2613f65a8c6a849.zip | |
use UFCS with Add::add and Sub::sub instead of unstable attributes
| -rw-r--r-- | src/libcore/iter/range.rs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/libcore/iter/range.rs b/src/libcore/iter/range.rs index a9487b7f46d..6cfec06b0ba 100644 --- a/src/libcore/iter/range.rs +++ b/src/libcore/iter/range.rs @@ -95,15 +95,13 @@ macro_rules! step_impl_unsigned { } #[inline] - #[rustc_inherit_overflow_checks] fn add_one(&self) -> Self { - *self + 1 + Add::add(*self, 1); } #[inline] - #[rustc_inherit_overflow_checks] fn sub_one(&self) -> Self { - *self - 1 + Sub::sub(*self, 1); } #[inline] @@ -168,15 +166,13 @@ macro_rules! step_impl_signed { } #[inline] - #[rustc_inherit_overflow_checks] fn add_one(&self) -> Self { - *self + 1 + Add::add(*self, 1); } #[inline] - #[rustc_inherit_overflow_checks] fn sub_one(&self) -> Self { - *self - 1 + Sub::sub(*self, 1); } #[inline] @@ -219,15 +215,13 @@ macro_rules! step_impl_no_between { } #[inline] - #[rustc_inherit_overflow_checks] fn add_one(&self) -> Self { - *self + 1 + Add::add(*self, 1); } #[inline] - #[rustc_inherit_overflow_checks] fn sub_one(&self) -> Self { - *self - 1 + Sub::sub(*self, 1); } #[inline] |
