Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f238148

Browse files
committed
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.
1 parent 0491e74 commit f238148

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/iter/range.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ macro_rules! step_identical_methods {
200200
}
201201

202202
#[inline]
203+
#[allow(arithmetic_overflow)]
203204
fn forward(start: Self, n: usize) -> Self {
204205
// In debug builds, trigger a panic on overflow.
205206
// This should optimize completely out in release builds.
@@ -211,6 +212,7 @@ macro_rules! step_identical_methods {
211212
}
212213

213214
#[inline]
215+
#[allow(arithmetic_overflow)]
214216
fn backward(start: Self, n: usize) -> Self {
215217
// In debug builds, trigger a panic on overflow.
216218
// This should optimize completely out in release builds.

0 commit comments

Comments
 (0)