]> git.proxmox.com Git - rustc.git/blobdiff - library/core/src/iter/range.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / library / core / src / iter / range.rs
index cd8ab11cb842641ede0ed39576e8328ad2ff0fa9..9e7055a370c9d6c7a76ded520199164e89f311f6 100644 (file)
@@ -111,7 +111,7 @@ pub unsafe trait Step: Clone + PartialOrd + Sized {
         Step::forward(start, count)
     }
 
-    /// Returns the value that would be obtained by taking the *successor*
+    /// Returns the value that would be obtained by taking the *predecessor*
     /// of `self` `count` times.
     ///
     /// If this would overflow the range of values supported by `Self`, returns `None`.
@@ -200,6 +200,7 @@ macro_rules! step_identical_methods {
         }
 
         #[inline]
+        #[allow(arithmetic_overflow)]
         fn forward(start: Self, n: usize) -> Self {
             // In debug builds, trigger a panic on overflow.
             // This should optimize completely out in release builds.
@@ -211,6 +212,7 @@ macro_rules! step_identical_methods {
         }
 
         #[inline]
+        #[allow(arithmetic_overflow)]
         fn backward(start: Self, n: usize) -> Self {
             // In debug builds, trigger a panic on overflow.
             // This should optimize completely out in release builds.