summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-07-20 16:36:42 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-07-25 05:45:52 -0700
commitf061560ce44eccf322b7dbf41f36340c6ec1debd (patch)
tree438199848cdbafab09ad6ebad8cf3fdd32331806 /src/libcore
parent168306f11b323164ebe4050b9dea29b9756ade47 (diff)
downloadrust-f061560ce44eccf322b7dbf41f36340c6ec1debd.tar.gz
rust-f061560ce44eccf322b7dbf41f36340c6ec1debd.zip
range() is pure
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/uint-template.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs
index d3c042fb05d..75e17cd6a9b 100644
--- a/src/libcore/uint-template.rs
+++ b/src/libcore/uint-template.rs
@@ -39,7 +39,7 @@ pure fn is_nonnegative(x: T) -> bool { x >= 0 as T }
 
 #[inline(always)]
 /// Iterate over the range [`lo`..`hi`)
-fn range(lo: T, hi: T, it: fn(T) -> bool) {
+pure fn range(lo: T, hi: T, it: fn(T) -> bool) {
     let mut i = lo;
     while i < hi {
         if !it(i) { break }