diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 2a7c583b61d..cb37ad361df 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -58,8 +58,6 @@ export zip; export swap; export reverse; export reversed; -export enum_chars; -export enum_uints; export iter; export iter2; export iteri; @@ -734,26 +732,6 @@ fn reversed(v: [const T]) -> [T] { ret rs; } -// FIXME: Seems like this should take char params. Maybe belongs in char -#[doc = "Returns a vector containing a range of chars"] -fn enum_chars(start: u8, end: u8) -> [char] { - assert start < end; - let mut i = start; - let mut r = []; - while i <= end { r += [i as char]; i += 1u as u8; } - ret r; -} - -// FIXME: Probably belongs in uint. Compare to uint::range -#[doc = "Returns a vector containing a range of uints"] -fn enum_uints(start: uint, end: uint) -> [uint] { - assert start < end; - let mut i = start; - let mut r = []; - while i <= end { r += [i]; i += 1u; } - ret r; -} - #[doc = " Iterates over a vector diff --git a/src/test/run-fail/zip-different-lengths.rs b/src/test/run-fail/zip-different-lengths.rs index 04ab5bf8d9d..4a5ac59efd2 100644 --- a/src/test/run-fail/zip-different-lengths.rs +++ b/src/test/run-fail/zip-different-lengths.rs @@ -6,6 +6,22 @@ import uint; import u8; import vec::*; +fn enum_chars(start: u8, end: u8) -> [char] { + assert start < end; + let mut i = start; + let mut r = []; + while i <= end { r += [i as char]; i += 1u as u8; } + ret r; +} + +fn enum_uints(start: uint, end: uint) -> [uint] { + assert start < end; + let mut i = start; + let mut r = []; + while i <= end { r += [i]; i += 1u; } + ret r; +} + fn main() { let a = 'a' as u8, j = 'j' as u8, k = 1u, l = 9u; // Silly, but necessary diff --git a/src/test/run-pass/zip-same-length.rs b/src/test/run-pass/zip-same-length.rs index 813548dc35e..73a0f66d382 100644 --- a/src/test/run-pass/zip-same-length.rs +++ b/src/test/run-pass/zip-same-length.rs @@ -6,6 +6,22 @@ import u8; import vec::*; +fn enum_chars(start: u8, end: u8) -> [char] { + assert start < end; + let mut i = start; + let mut r = []; + while i <= end { r += [i as char]; i += 1u as u8; } + ret r; +} + +fn enum_uints(start: uint, end: uint) -> [uint] { + assert start < end; + let mut i = start; + let mut r = []; + while i <= end { r += [i]; i += 1u; } + ret r; +} + fn main() { let a = 'a' as u8, j = 'j' as u8, k = 1u, l = 10u; // Silly, but necessary