Skip to content

Commit 629f1b2

Browse files
committed
Merge pull request #2557 from bstrie/inlinerange
Inline `range` for all integral types
2 parents 24fb724 + 89e424d commit 629f1b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/int-template.rs

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pure fn is_negative(x: T) -> bool { x < 0 as T }
3838
pure fn is_nonpositive(x: T) -> bool { x <= 0 as T }
3939
pure fn is_nonnegative(x: T) -> bool { x >= 0 as T }
4040

41+
#[inline(always)]
4142
#[doc = "Iterate over the range [`lo`..`hi`)"]
4243
fn range(lo: T, hi: T, it: fn(T) -> bool) {
4344
let mut i = lo;

0 commit comments

Comments
 (0)