From f238148214790a0aa96c30b875b71ef6beb2485a Mon Sep 17 00:00:00 2001 From: oli Date: Wed, 30 Dec 2020 02:09:29 +0000 Subject: [PATCH] Allow libcore to be built with MIR inlining Inlining caused new lints to get emitted, so we silence those lints now that we actually can. --- library/core/src/iter/range.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs index 4321b2187e10..9e7055a370c9 100644 --- a/library/core/src/iter/range.rs +++ b/library/core/src/iter/range.rs @@ -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.