diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-06-21 16:44:10 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-06-21 16:44:10 -0700 |
| commit | 312faf31dfcce7a2d15495c5042d80a3e3b476c9 (patch) | |
| tree | 4ad8383191907b5cb148291a2d1dbc078f590eb6 /src/libstd | |
| parent | 57101780811490fa759ed1dca310c405d28c0a72 (diff) | |
Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/bitv.rs | 9 | ||||
| -rw-r--r-- | src/libstd/deque.rs | 4 | ||||
| -rw-r--r-- | src/libstd/map.rs | 4 | ||||
| -rw-r--r-- | src/libstd/net_ip.rs | 2 | ||||
| -rw-r--r-- | src/libstd/net_tcp.rs | 35 | ||||
| -rw-r--r-- | src/libstd/smallintmap.rs | 4 | ||||
| -rw-r--r-- | src/libstd/time.rs | 37 | ||||
| -rw-r--r-- | src/libstd/uv_ll.rs | 2 |
8 files changed, 44 insertions, 53 deletions
diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs index 1be4d12d23e..254ed4d4ede 100644 --- a/src/libstd/bitv.rs +++ b/src/libstd/bitv.rs @@ -16,11 +16,10 @@ export to_vec; export to_str; export eq_vec; -// FIXME: With recursive object types, we could implement binary methods like -// union, intersection, and difference. At that point, we could write -// an optimizing version of this module that produces a different obj -// for the case where nbits <= 32. -// (Issue #2341) +// FIXME (#2341): With recursive object types, we could implement binary +// methods like union, intersection, and difference. At that point, we could +// write an optimizing version of this module that produces a different obj +// for the case where nbits <= 32. #[doc = "The bitvector type"] type bitv = @{storage: [mut uint], nbits: uint}; diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs index eafd2776d19..f57d2a21af6 100644 --- a/src/libstd/deque.rs +++ b/src/libstd/deque.rs @@ -14,8 +14,8 @@ iface t<T> { fn get(int) -> T; } -// FIXME eventually, a proper datatype plus an exported impl would be -// preferrable (#2343) +// FIXME (#2343) eventually, a proper datatype plus an exported impl would +// be preferrable. fn create<T: copy>() -> t<T> { type cell<T> = option<T>; diff --git a/src/libstd/map.rs b/src/libstd/map.rs index bfa1fb4a7b6..c988b167fd0 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -67,8 +67,8 @@ iface map<K, V: copy> { fn each_value(fn(V) -> bool); } -// FIXME: package this up and export it as a datatype usable for -// external code that doesn't want to pay the cost of a box. (#2344) +// FIXME (#2344): package this up and export it as a datatype usable for +// external code that doesn't want to pay the cost of a box. mod chained { export t, mk, hashmap; diff --git a/src/libstd/net_ip.rs b/src/libstd/net_ip.rs index 024a4367eb8..64cded848d1 100644 --- a/src/libstd/net_ip.rs +++ b/src/libstd/net_ip.rs @@ -36,7 +36,7 @@ fn format_addr(ip: ip_addr) -> str { #fmt["%u.%u.%u.%u", a as uint, b as uint, c as uint, d as uint] } ipv6(_, _, _, _, _, _, _, _) { - fail "FIXME impl parsing of ipv6 addr"; + fail "FIXME (#2651) impl parsing of ipv6 addr"; } } } diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs index 0b06dd67f76..a2d36ac354b 100644 --- a/src/libstd/net_tcp.rs +++ b/src/libstd/net_tcp.rs @@ -2,15 +2,12 @@ High-level interface to libuv's TCP functionality "]; -// FIXME: Fewer import *'s import ip = net_ip; import uv::iotask; import uv::iotask::iotask; -import comm::*; -import result::*; -import str::*; -import future::*; -import libc::size_t; +import comm::methods; +import future::future; +import result::{result,err,ok,extensions}; // data export tcp_socket, tcp_conn_port, tcp_err_data; @@ -364,8 +361,8 @@ fn new_listener(host_ip: ip::ip_addr, port: uint, backlog: uint, let new_conn_po = comm::port::<result::result<*uv::ll::uv_tcp_t, tcp_err_data>>(); let new_conn_ch = comm::chan(new_conn_po); - // FIXME: This shared box should not be captured in the i/o task - // Make it a unique pointer. + // FIXME (#2656): This shared box should not be captured in the i/o + // task Make it a unique pointer. let server_data: @tcp_conn_port_data = @{ server_stream: uv::ll::tcp_t(), stream_closed_po: stream_closed_po, @@ -946,10 +943,10 @@ fn write_common_impl(socket_data_ptr: *tcp_socket_data, } } }; - // FIXME: Instead of passing unsafe pointers to local data, and waiting - // here for the write to complete, we should transfer ownership of - // everything to the I/O task and let it deal with the aftermath, - // so we don't have to sit here blocking. + // FIXME (#2656): Instead of passing unsafe pointers to local data, + // and waiting here for the write to complete, we should transfer + // ownership of everything to the I/O task and let it deal with the + // aftermath, so we don't have to sit here blocking. alt comm::recv(result_po) { tcp_write_success { result::ok(()) } tcp_write_error(err_data) { result::err(err_data.to_tcp_err()) } @@ -1191,20 +1188,16 @@ crust fn tcp_write_complete_cb(write_req: *uv::ll::uv_write_t, status: libc::c_int) unsafe { let write_data_ptr = uv::ll::get_data_for_req(write_req) as *write_req_data; - // FIXME: if instead of alt - alt status { - 0i32 { + if status == 0i32 { log(debug, "successful write complete"); comm::send((*write_data_ptr).result_ch, tcp_write_success); - } - _ { + } else { let stream_handle_ptr = uv::ll::get_stream_handle_from_write_req( write_req); let loop_ptr = uv::ll::get_loop_for_uv_handle(stream_handle_ptr); let err_data = uv::ll::get_last_err_data(loop_ptr); log(debug, "failure to write"); comm::send((*write_data_ptr).result_ch, tcp_write_error(err_data)); - } } } @@ -1273,20 +1266,20 @@ type tcp_socket_data = { // convert rust ip_addr to libuv's native representation fn ipv4_ip_addr_to_sockaddr_in(input_ip: ip::ip_addr, port: uint) -> uv::ll::sockaddr_in unsafe { - // FIXME ipv6 + // FIXME (#2656): ipv6 alt input_ip { ip::ipv4(_,_,_,_) { uv::ll::ip4_addr(ip::format_addr(input_ip), port as int) } ip::ipv6(_,_,_,_,_,_,_,_) { - fail "FIXME ipv6 not yet supported"; + fail "FIXME (#2656) ipv6 not yet supported"; } } } #[cfg(test)] mod test { - // FIXME don't run on fbsd or linux 32 bit(#2064) + // FIXME don't run on fbsd or linux 32 bit (#2064) #[cfg(target_os="win32")] #[cfg(target_os="darwin")] #[cfg(target_os="linux")] diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs index 3a3b90d2513..89e9d0338fe 100644 --- a/src/libstd/smallintmap.rs +++ b/src/libstd/smallintmap.rs @@ -6,8 +6,8 @@ import core::option; import core::option::{some, none}; import dvec::{dvec, extensions}; -// FIXME: Should not be @; there's a bug somewhere in rustc that requires this -// to be. (#2347) +// FIXME (#2347): Should not be @; there's a bug somewhere in rustc that +// requires this to be. type smallintmap<T: copy> = @{v: dvec<option<T>>}; #[doc = "Create a smallintmap"] diff --git a/src/libstd/time.rs b/src/libstd/time.rs index 2c7902c63e9..d06749b5757 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -319,15 +319,14 @@ fn strptime(s: str, format: str) -> result<tm, str> { .chain { |pos| parse_type(s, pos, 'd', tm) } } 'H' { - // FIXME: range check. (#2350 -- same issue for all FIXMEs in this - // file.) + // FIXME (#2350): range check. alt match_digits(s, pos, 2u, false) { some(item) { let (v, pos) = item; tm.tm_hour = v; ok(pos) } none { err("Invalid hour") } } } 'I' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 2u, false) { some(item) { let (v, pos) = item; @@ -338,7 +337,7 @@ fn strptime(s: str, format: str) -> result<tm, str> { } } 'j' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 3u, false) { some(item) { let (v, pos) = item; @@ -349,14 +348,14 @@ fn strptime(s: str, format: str) -> result<tm, str> { } } 'k' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 2u, true) { some(item) { let (v, pos) = item; tm.tm_hour = v; ok(pos) } none { err("Invalid hour") } } } 'l' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 2u, true) { some(item) { let (v, pos) = item; @@ -367,14 +366,14 @@ fn strptime(s: str, format: str) -> result<tm, str> { } } 'M' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 2u, false) { some(item) { let (v, pos) = item; tm.tm_min = v; ok(pos) } none { err("Invalid minute") } } } 'm' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 2u, false) { some(item) { let (v, pos) = item; @@ -412,7 +411,7 @@ fn strptime(s: str, format: str) -> result<tm, str> { .chain { |pos| parse_type(s, pos, 'p', tm) } } 'S' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 2u, false) { some(item) { let (v, pos) = item; @@ -432,7 +431,7 @@ fn strptime(s: str, format: str) -> result<tm, str> { } 't' { parse_char(s, pos, '\t') } 'u' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 1u, false) { some(item) { let (v, pos) = item; @@ -451,7 +450,7 @@ fn strptime(s: str, format: str) -> result<tm, str> { } //'W' {} 'w' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 1u, false) { some(item) { let (v, pos) = item; tm.tm_wday = v; ok(pos) } none { err("Invalid weekday") } @@ -460,7 +459,7 @@ fn strptime(s: str, format: str) -> result<tm, str> { //'X' {} //'x' {} 'Y' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 4u, false) { some(item) { let (v, pos) = item; @@ -471,7 +470,7 @@ fn strptime(s: str, format: str) -> result<tm, str> { } } 'y' { - // FIXME: range check. + // FIXME (#2350): range check. alt match_digits(s, pos, 2u, false) { some(item) { let (v, pos) = item; @@ -584,7 +583,7 @@ fn strptime(s: str, format: str) -> result<tm, str> { fn strftime(format: str, tm: tm) -> str { fn parse_type(ch: char, tm: tm) -> str { - //FIXME: Implement missing types. + //FIXME (#2350): Implement missing types. alt check ch { 'A' { alt check tm.tm_wday as int { @@ -915,7 +914,7 @@ mod tests { assert local.tm_isdst == 0_i32; assert local.tm_gmtoff == -28800_i32; - // FIXME: We should probably standardize on the timezone + // FIXME (#2350): We should probably standardize on the timezone // abbreviation. let zone = local.tm_zone; assert zone == "PST" || zone == "Pacific Standard Time"; @@ -1063,8 +1062,8 @@ mod tests { assert test("2009-02-13", "%F"); assert test("03", "%H"); assert test("13", "%H"); - assert test("03", "%I"); // FIXME: flesh out - assert test("11", "%I"); // FIXME: flesh out + assert test("03", "%I"); // FIXME (#2350): flesh out + assert test("11", "%I"); // FIXME (#2350): flesh out assert test("044", "%j"); assert test(" 3", "%k"); assert test("13", "%k"); @@ -1162,7 +1161,7 @@ mod tests { assert local.strftime("%Y") == "2009"; assert local.strftime("%y") == "09"; - // FIXME: We should probably standardize on the timezone + // FIXME (#2350): We should probably standardize on the timezone // abbreviation. let zone = local.strftime("%Z"); assert zone == "PST" || zone == "Pacific Standard Time"; @@ -1170,7 +1169,7 @@ mod tests { assert local.strftime("%z") == "-0800"; assert local.strftime("%%") == "%"; - // FIXME: We should probably standardize on the timezone + // FIXME (#2350): We should probably standardize on the timezone // abbreviation. let rfc822 = local.rfc822(); let prefix = "Fri, 13 Feb 2009 15:31:30 "; diff --git a/src/libstd/uv_ll.rs b/src/libstd/uv_ll.rs index e882eba5d6b..b7e1ee7d82c 100644 --- a/src/libstd/uv_ll.rs +++ b/src/libstd/uv_ll.rs @@ -505,7 +505,7 @@ native mod rustrt { tcp_handle_ptr: *uv_tcp_t, ++after_cb: *u8, ++addr: *sockaddr_in) -> libc::c_int; - // FIXME ref 2064 + // FIXME ref #2064 fn rust_uv_tcp_bind(tcp_server: *uv_tcp_t, ++addr: *sockaddr_in) -> libc::c_int; fn rust_uv_listen(stream: *libc::c_void, backlog: libc::c_int, |
