diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs index 3f58548684c..534f2a492d2 100644 --- a/src/libcore/extfmt.rs +++ b/src/libcore/extfmt.rs @@ -164,28 +164,26 @@ mod ct { let noflags: [flag] = []; if i >= lim { ret {flags: noflags, next: i}; } - // FIXME: This recursion generates illegal instructions if the return - // value isn't boxed. Only started happening after the ivec conversion fn more_(f: flag, s: str, i: uint, lim: uint) -> - @{flags: [flag], next: uint} { + {flags: [flag], next: uint} { let next = parse_flags(s, i + 1u, lim); let rest = next.flags; let j = next.next; let curr: [flag] = [f]; - ret @{flags: curr + rest, next: j}; + ret {flags: curr + rest, next: j}; } let more = bind more_(_, s, i, lim); let f = s[i]; ret if f == '-' as u8 { - *more(flag_left_justify) + more(flag_left_justify) } else if f == '0' as u8 { - *more(flag_left_zero_pad) + more(flag_left_zero_pad) } else if f == ' ' as u8 { - *more(flag_space_for_sign) + more(flag_space_for_sign) } else if f == '+' as u8 { - *more(flag_sign_always) + more(flag_sign_always) } else if f == '#' as u8 { - *more(flag_alternate) + more(flag_alternate) } else { {flags: noflags, next: i} }; } fn parse_count(s: str, i: uint, lim: uint) -> {count: count, next: uint} { diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 618fa04a314..c7c037c4238 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -665,8 +665,6 @@ Returns: The original string with all occurances of `from` replaced with `to` */ fn replace(s: str, from: str, to: str) : is_not_empty(from) -> str unsafe { - // FIXME (694): Shouldn't have to check this - check (is_not_empty(from)); if byte_len(s) == 0u { ret ""; } else if starts_with(s, from) { diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs index 40b50c1ad4b..9d9bdb58078 100644 --- a/src/libcore/sys.rs +++ b/src/libcore/sys.rs @@ -73,12 +73,6 @@ fn refcount(t: @T) -> uint { ret rustrt::refcount::(t); } -// FIXME: There's a wrapper for this in the task module and this really -// just belongs there -fn unsupervise() -> () { - ret rustrt::unsupervise(); -} - fn log_str(t: T) -> str { rustrt::shape_log_str(get_type_desc::(), t) } diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 0b8abdc36a7..ec6f98fbf45 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -72,6 +72,7 @@ native mod rustrt { fn start_task(id: task, closure: *rust_closure); fn rust_task_is_unwinding(rt: *rust_task) -> bool; + fn unsupervise(); } /* Section: Types */ @@ -287,10 +288,7 @@ fn join(task_port: joinable_task) -> task_result { if _id == id { ret res } else { - // FIXME: uncomment this when extfmt is moved to core - // in a snapshot. - // fail #fmt["join received id %d, expected %d", _id, id] - fail; + fail #fmt["join received id %d, expected %d", _id, id] } } } @@ -303,7 +301,9 @@ Detaches this task from its parent in the task tree An unsupervised task will not propagate its failure up the task tree */ -fn unsupervise() { ret sys::unsupervise(); } +fn unsupervise() { + rustrt::unsupervise(); +} /* Function: currently_unwinding()