diff options
| author | Brian Anderson <andersrb@gmail.com> | 2012-06-08 18:48:56 -0700 |
|---|---|---|
| committer | Brian Anderson <andersrb@gmail.com> | 2012-06-08 18:48:56 -0700 |
| commit | 629f1b2e37e69c5f1bc24fcf1ae93e9e786afbfd (patch) | |
| tree | 9c449b1df46246e7f3e8450ac5febb8d85c7ad34 | |
| parent | 24fb724dc9cd546542508de0b75cf7427fbd4ee7 (diff) | |
| parent | 89e424d373766c74f3da94c91bc8d3ac29b8fa43 (diff) | |
| download | rust-629f1b2e37e69c5f1bc24fcf1ae93e9e786afbfd.tar.gz rust-629f1b2e37e69c5f1bc24fcf1ae93e9e786afbfd.zip | |
Merge pull request #2557 from bstrie/inlinerange
Inline `range` for all integral types
| -rw-r--r-- | src/libcore/int-template.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/int-template.rs b/src/libcore/int-template.rs index 556b9944dde..2ea166cfc36 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; |
