]> git.lizzy.rs Git - rust.git/commitdiff
Allow libcore to be built with MIR inlining
authoroli <github35764891676564198441@oli-obk.de>
Wed, 30 Dec 2020 02:09:29 +0000 (02:09 +0000)
committeroli <github35764891676564198441@oli-obk.de>
Sat, 23 Jan 2021 16:51:23 +0000 (16:51 +0000)
Inlining caused new lints to get emitted, so we silence those lints now that we actually can.

library/core/src/iter/range.rs

index 4321b2187e10864806325ab07f4bb33f810de15e..9e7055a370c9d6c7a76ded520199164e89f311f6 100644 (file)
@@ -200,6 +200,7 @@ unsafe fn backward_unchecked(start: Self, n: usize) -> Self {
         }
 
         #[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 @@ fn forward(start: Self, n: usize) -> Self {
         }
 
         #[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.