From 89e424d373766c74f3da94c91bc8d3ac29b8fa43 Mon Sep 17 00:00:00 2001 From: Ben Striegel Date: Fri, 8 Jun 2012 21:18:41 -0400 Subject: [PATCH] Inline `range` for all integral types --- src/libcore/int-template.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/int-template.rs b/src/libcore/int-template.rs index 556b9944dde4d..2ea166cfc3689 100644 --- a/src/libcore/int-template.rs +++ b/src/libcore/int-template.rs @@ -38,6 +38,7 @@ pure fn is_negative(x: T) -> bool { x < 0 as T } pure fn is_nonpositive(x: T) -> bool { x <= 0 as T } pure fn is_nonnegative(x: T) -> bool { x >= 0 as T } +#[inline(always)] #[doc = "Iterate over the range [`lo`..`hi`)"] fn range(lo: T, hi: T, it: fn(T) -> bool) { let mut i = lo;