Removed all instances of XXX in preparation for relaxing of FIXME rule

This commit is contained in:
Salem Talha 2014-01-26 03:43:42 -05:00
parent 838b5a4cc0
commit cc61fc0994
72 changed files with 119 additions and 119 deletions

View File

@ -636,7 +636,7 @@ CFG_INFO := $(info cfg: *** compiler is in snapshot transition ***)
CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
CFG_INFO := $(info cfg:)
#XXX This is surely busted
#FIXME This is surely busted
all: $(SREQ1$(CFG_BUILD)) $(GENERATED) docs
else

View File

@ -2895,7 +2895,7 @@ and only if that results in no match look at items you brought in
scope with corresponding `use` statements.
~~~ {.ignore}
# // XXX: Allow unused import in doc test
# // FIXME: Allow unused import in doc test
use farm::cow;
// ...
# mod farm { pub fn cow() { println!("Hidden ninja cow is hidden.") } }

View File

@ -596,7 +596,7 @@ define CFG_MAKE_TOOLCHAIN
else
# For the ARM and MIPS crosses, use the toolchain assembler
# XXX: We should be able to use the LLVM assembler
# FIXME: We should be able to use the LLVM assembler
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)

View File

@ -276,7 +276,7 @@ impl Arena {
#[inline]
pub fn alloc<'a, T>(&'a self, op: || -> T) -> &'a T {
unsafe {
// XXX: Borrow check
// FIXME: Borrow check
let this = transmute_mut(self);
if intrinsics::needs_drop::<T>() {
this.alloc_nonpod(op)

View File

@ -630,7 +630,7 @@ pub mod writer {
// FIXME (#2741): Provide a function to write the standard ebml header.
impl<'a> Encoder<'a> {
/// XXX(pcwalton): Workaround for badness in trans. DO NOT USE ME.
/// FIXME(pcwalton): Workaround for badness in trans. DO NOT USE ME.
pub unsafe fn unsafe_clone(&self) -> Encoder<'a> {
Encoder {
writer: cast::transmute_copy(&self.writer),

View File

@ -93,7 +93,7 @@ pub fn glob_with(pattern: &str, options: MatchOptions) -> Paths {
let pat_root = Path::new(pattern).root_path();
if pat_root.is_some() {
if check_windows_verbatim(pat_root.get_ref()) {
// XXX: How do we want to handle verbatim paths? I'm inclined to return nothing,
// FIXME: How do we want to handle verbatim paths? I'm inclined to return nothing,
// since we can't very well find all UNC shares with a 1-letter server name.
return Paths { root: root, dir_patterns: ~[], options: options, todo: ~[] };
}

View File

@ -174,7 +174,7 @@ fn decode_inner(s: &str, full_url: bool) -> ~str {
let mut bytes = [0, 0];
match rdr.read(bytes) {
Some(2) => {}
_ => fail!() // XXX: malformed url?
_ => fail!() // FIXME: malformed url?
}
let ch = uint::parse_bytes(bytes, 16u).unwrap() as u8 as char;
@ -308,7 +308,7 @@ pub fn decode_form_urlencoded(s: &[u8]) -> HashMap<~str, ~[~str]> {
let mut bytes = [0, 0];
match rdr.read(bytes) {
Some(2) => {}
_ => fail!() // XXX: malformed?
_ => fail!() // FIXME: malformed?
}
uint::parse_bytes(bytes, 16u).unwrap() as u8 as char
}

View File

@ -413,7 +413,7 @@ impl<'a> Prep<'a> {
let (port, chan) = Chan::new();
let blk = bo.take_unwrap();
// XXX: What happens if the task fails?
// FIXME: What happens if the task fails?
do spawn {
let mut exe = Exec {
discovered_inputs: WorkMap::new(),

View File

@ -139,7 +139,7 @@ impl EventLoop for BasicLoop {
self.work.push(f);
}
// XXX: Seems like a really weird requirement to have an event loop provide.
// FIXME: Seems like a really weird requirement to have an event loop provide.
fn pausable_idle_callback(&mut self, cb: ~Callback) -> ~PausableIdleCallback {
let callback = ~BasicPausable::new(self, cb);
rtassert!(self.idle.is_none());

View File

@ -8,14 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// XXX: this file probably shouldn't exist
// FIXME: this file probably shouldn't exist
#[macro_escape];
use std::fmt;
// Indicates whether we should perform expensive sanity checks, including rtassert!
// XXX: Once the runtime matures remove the `true` below to turn off rtassert, etc.
// FIXME: Once the runtime matures remove the `true` below to turn off rtassert, etc.
pub static ENFORCE_SANITY: bool = true || !cfg!(rtopt) || cfg!(rtdebug) || cfg!(rtassert);
macro_rules! rterrln (

View File

@ -32,7 +32,7 @@ use task::{TypeSched, GreenTask, HomeSched, AnySched};
/// struct. The scheduler struct acts like a baton, all scheduling
/// actions are transfers of the baton.
///
/// XXX: This creates too many callbacks to run_sched_once, resulting
/// FIXME: This creates too many callbacks to run_sched_once, resulting
/// in too much allocation and too many events.
pub struct Scheduler {
/// ID number of the pool that this scheduler is a member of. When
@ -171,7 +171,7 @@ impl Scheduler {
return sched;
}
// XXX: This may eventually need to be refactored so that
// FIXME: This may eventually need to be refactored so that
// the scheduler itself doesn't have to call event_loop.run.
// That will be important for embedding the runtime into external
// event loops.
@ -898,7 +898,7 @@ impl CleanupJob {
}
}
// XXX: Some hacks to put a || closure in Scheduler without borrowck
// FIXME: Some hacks to put a || closure in Scheduler without borrowck
// complaining
type UnsafeTaskReceiver = raw::Closure;
trait ClosureConverter {

View File

@ -61,7 +61,7 @@ impl Stack {
valgrind_id: 0
};
// XXX: Using the FFI to call a C macro. Slow
// FIXME: Using the FFI to call a C macro. Slow
stk.valgrind_id = unsafe {
rust_valgrind_stack_register(stk.start(), stk.end())
};
@ -117,7 +117,7 @@ fn protect_last_page(stack: &MemoryMap) -> bool {
impl Drop for Stack {
fn drop(&mut self) {
unsafe {
// XXX: Using the FFI to call a C macro. Slow
// FIXME: Using the FFI to call a C macro. Slow
rust_valgrind_stack_deregister(self.valgrind_id);
}
}

View File

@ -674,7 +674,7 @@ pub fn chown(p: &CString, uid: int, gid: int) -> IoResult<()> {
pub fn readlink(p: &CString) -> IoResult<Path> {
return os_readlink(p);
// XXX: I have a feeling that this reads intermediate symlinks as well.
// FIXME: I have a feeling that this reads intermediate symlinks as well.
#[cfg(windows)]
fn os_readlink(p: &CString) -> IoResult<Path> {
let handle = unsafe {
@ -709,7 +709,7 @@ pub fn readlink(p: &CString) -> IoResult<Path> {
let p = p.with_ref(|p| p);
let mut len = unsafe { libc::pathconf(p, libc::_PC_NAME_MAX) };
if len == -1 {
len = 1024; // XXX: read PATH_MAX from C ffi?
len = 1024; // FIXME: read PATH_MAX from C ffi?
}
let mut buf = vec::with_capacity::<u8>(len as uint);
match retry(|| unsafe {
@ -877,7 +877,7 @@ pub fn stat(p: &CString) -> IoResult<io::FileStat> {
pub fn lstat(p: &CString) -> IoResult<io::FileStat> {
return os_lstat(p);
// XXX: windows implementation is missing
// FIXME: windows implementation is missing
#[cfg(windows)]
fn os_lstat(_p: &CString) -> IoResult<io::FileStat> {
Err(super::unimpl())

View File

@ -97,7 +97,7 @@ fn translate_error(errno: i32, detail: bool) -> IoError {
#[cfg(not(windows))]
fn get_err(errno: i32) -> (io::IoErrorKind, &'static str) {
// XXX: this should probably be a bit more descriptive...
// FIXME: this should probably be a bit more descriptive...
match errno {
libc::EOF => (io::EndOfFile, "end of file"),
libc::ECONNREFUSED => (io::ConnectionRefused, "connection refused"),

View File

@ -104,7 +104,7 @@ fn helper(input: libc::c_int, messages: Port<Req>) {
let mut bits = [0, ..8];
// drain the timerfd of how many times its fired
//
// XXX: should this perform a send() this number of
// FIXME: should this perform a send() this number of
// times?
FileDesc::new(fd, false).inner_read(bits);
let remove = {

View File

@ -330,7 +330,7 @@ fn parse_crate_attrs(sess: session::Session,
/// The diagnostic emitter yielded to the procedure should be used for reporting
/// errors of the compiler.
pub fn monitor(f: proc(@diagnostic::Emitter)) {
// XXX: This is a hack for newsched since it doesn't support split stacks.
// FIXME: This is a hack for newsched since it doesn't support split stacks.
// rustc needs a lot of stack! When optimizations are disabled, it needs
// even *more* stack than usual as well.
#[cfg(rtopt)]
@ -341,7 +341,7 @@ pub fn monitor(f: proc(@diagnostic::Emitter)) {
let mut task_builder = task::task();
task_builder.name("rustc");
// XXX: Hacks on hacks. If the env is trying to override the stack size
// FIXME: Hacks on hacks. If the env is trying to override the stack size
// then *don't* set it explicitly.
if os::getenv("RUST_MIN_STACK").is_none() {
task_builder.opts.stack_size = Some(STACK_SIZE);

View File

@ -1275,7 +1275,7 @@ fn encode_info_for_item(ecx: &EncodeContext,
// If this is a static method, we've already encoded
// this.
if method_ty.explicit_self != SelfStatic {
// XXX: I feel like there is something funny going on.
// FIXME: I feel like there is something funny going on.
let tpt = ty::lookup_item_type(tcx, method_def_id);
encode_bounds_and_type(ebml_w, ecx, &tpt);
}

View File

@ -187,7 +187,7 @@ impl Context {
for lib in libs.mut_iter() {
match lib.dylib {
Some(ref p) if p.filename_str() == Some(file.as_slice()) => {
assert!(lib.rlib.is_none()); // XXX: legit compiler error
assert!(lib.rlib.is_none()); // FIXME: legit compiler error
lib.rlib = Some(path.clone());
return true;
}
@ -207,7 +207,7 @@ impl Context {
for lib in libs.mut_iter() {
match lib.rlib {
Some(ref p) if p.filename_str() == Some(file.as_slice()) => {
assert!(lib.dylib.is_none()); // XXX: legit compiler error
assert!(lib.dylib.is_none()); // FIXME: legit compiler error
lib.dylib = Some(path.clone());
return true;
}

View File

@ -913,7 +913,7 @@ impl<'a,'b> ast_util::IdVisitingOperation for
// it is mutable. But I believe it's harmless since we generate
// balanced EBML.
//
// XXX(pcwalton): Don't copy this way.
// FIXME(pcwalton): Don't copy this way.
let mut new_ebml_w = unsafe {
self.new_ebml_w.unsafe_clone()
};

View File

@ -416,7 +416,7 @@ impl<'a> GatherLoanCtxt<'a> {
}
ty::AutoObject(..) => {
// XXX: Handle @Trait to &Trait casts here?
// FIXME: Handle @Trait to &Trait casts here?
}
}
}

View File

@ -50,7 +50,7 @@ pub mod move_data;
pub struct LoanDataFlowOperator;
/// XXX(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// yet on unit structs.
impl Clone for LoanDataFlowOperator {
fn clone(&self) -> LoanDataFlowOperator {

View File

@ -148,7 +148,7 @@ pub struct Assignment {
pub struct MoveDataFlowOperator;
/// XXX(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// yet on unit structs.
impl Clone for MoveDataFlowOperator {
fn clone(&self) -> MoveDataFlowOperator {
@ -160,7 +160,7 @@ pub type MoveDataFlow = DataFlowContext<MoveDataFlowOperator>;
pub struct AssignDataFlowOperator;
/// XXX(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// yet on unit structs.
impl Clone for AssignDataFlowOperator {
fn clone(&self) -> AssignDataFlowOperator {

View File

@ -404,7 +404,7 @@ impl ReachableContext {
// Step 3: Mark all destructors as reachable.
//
// XXX(pcwalton): This is a conservative overapproximation, but fixing
// FIXME(pcwalton): This is a conservative overapproximation, but fixing
// this properly would result in the necessity of computing *type*
// reachability, which might result in a compile time loss.
fn mark_destructors_reachable(&self) {

View File

@ -61,7 +61,7 @@ pub struct Export2 {
// not contain any entries from local crates.
pub type ExternalExports = HashSet<DefId>;
// XXX: dox
// FIXME: dox
pub type LastPrivateMap = HashMap<NodeId, LastPrivate>;
pub enum LastPrivate {
@ -1411,7 +1411,7 @@ impl Resolver {
parent: ReducedGraphParent,
parent_public: bool) {
let ident = variant.node.name;
// XXX: this is unfortunate to have to do this privacy calculation
// FIXME: this is unfortunate to have to do this privacy calculation
// here. This should be living in middle::privacy, but it's
// necessary to keep around in some form becaues of glob imports...
let is_public = parent_public && variant.node.vis != ast::Private;
@ -5282,7 +5282,7 @@ impl Resolver {
`{}`",
interner_get(label))),
Some(DlDef(def @ DefLabel(_))) => {
// XXX: is AllPublic correct?
// FIXME: is AllPublic correct?
self.record_def(expr.id, (def, AllPublic))
}
Some(_) => {

View File

@ -643,7 +643,7 @@ fn enter_opt<'r,'b>(
}
ast::PatEnum(_, ref subpats) => {
if opt_eq(tcx, &variant_opt(bcx, p.id), opt) {
// XXX: Must we clone?
// FIXME: Must we clone?
match *subpats {
None => Some(vec::from_elem(variant_size, dummy)),
_ => (*subpats).clone(),

View File

@ -805,7 +805,7 @@ fn padding(size: u64) -> ValueRef {
C_undef(Type::array(&Type::i8(), size))
}
// XXX this utility routine should be somewhere more general
// FIXME this utility routine should be somewhere more general
#[inline]
fn roundup(x: u64, a: u64) -> u64 { ((x + (a - 1)) / a) * a }

View File

@ -384,7 +384,7 @@ pub fn trans_expr_fn<'a>(
let sub_path = vec::append_one(bcx.fcx.path.clone(),
PathName(special_idents::anon));
// XXX: Bad copy.
// FIXME: Bad copy.
let s = mangle_internal_name_by_path_and_seq(ccx,
sub_path.clone(),
"expr_fn");

View File

@ -283,7 +283,7 @@ pub fn const_expr(cx: @CrateContext, e: &ast::Expr) -> (ValueRef, bool) {
let tsize = machine::llsize_of_alloc(cx, llty);
if csize != tsize {
unsafe {
// XXX these values could use some context
// FIXME these values could use some context
llvm::LLVMDumpValue(llconst);
llvm::LLVMDumpValue(C_undef(llty));
}

View File

@ -417,7 +417,7 @@ pub fn trans_intrinsic(ccx: @CrateContext,
RetVoid(bcx);
}
"morestack_addr" => {
// XXX This is a hack to grab the address of this particular
// FIXME This is a hack to grab the address of this particular
// native function. There should be a general in-language
// way to do this
let llfty = type_of_rust_fn(bcx.ccx(), None, [], ty::mk_nil());

View File

@ -95,7 +95,7 @@ pub fn trans_impl(ccx: @CrateContext,
/// * `llfn`: a closure returning the LLVM ValueRef for the method
/// * `impl_id`: the node ID of the impl this method is inside
///
/// XXX(pcwalton) Can we take `path` by reference?
/// FIXME(pcwalton) Can we take `path` by reference?
pub fn trans_method(ccx: @CrateContext,
path: Path,
method: &ast::Method,

View File

@ -2494,7 +2494,7 @@ pub fn type_is_pod(cx: ctxt, ty: t) -> bool {
ty_enum(did, ref substs) => {
let variants = enum_variants(cx, did);
for variant in (*variants).iter() {
// XXX(pcwalton): This is an inefficient way to do this. Don't
// FIXME(pcwalton): This is an inefficient way to do this. Don't
// synthesize a tuple!
//
// Perform any type parameter substitutions.
@ -2655,7 +2655,7 @@ pub fn node_id_to_type(cx: ctxt, id: ast::NodeId) -> t {
}
}
// XXX(pcwalton): Makes a copy, bleh. Probably better to not do that.
// FIXME(pcwalton): Makes a copy, bleh. Probably better to not do that.
pub fn node_id_to_type_params(cx: ctxt, id: ast::NodeId) -> ~[t] {
let node_type_substs = cx.node_type_substs.borrow();
match node_type_substs.get().find(&id) {

View File

@ -861,7 +861,7 @@ impl<'a> LookupContext<'a> {
rcvr_ty: ty::t,
candidates: &mut ~[Candidate])
-> Option<method_map_entry> {
// XXX(pcwalton): Do we need to clone here?
// FIXME(pcwalton): Do we need to clone here?
let relevant_candidates: ~[Candidate] =
candidates.iter().map(|c| (*c).clone()).
filter(|c| self.is_relevant(rcvr_ty, c)).collect();
@ -1169,7 +1169,7 @@ impl<'a> LookupContext<'a> {
let destructors = self.tcx().destructors.borrow();
bad = destructors.get().contains(&method_id);
}
// XXX: does this properly enforce this on everything now
// FIXME: does this properly enforce this on everything now
// that self has been merged in? -sully
method_param(method_param { trait_id: trait_id, .. }) |
method_object(method_object { trait_id: trait_id, .. }) => {

View File

@ -2691,7 +2691,7 @@ pub fn check_expr_with_unifier(fcx: @FnCtxt,
let mut checked = false;
match place.node {
ast::ExprPath(ref path) => {
// XXX(pcwalton): For now we hardcode the two permissible
// FIXME(pcwalton): For now we hardcode the two permissible
// places: the exchange heap and the managed heap.
let definition = lookup_def(fcx, path.span, place.id);
let def_id = ast_util::def_id_of_def(definition);

View File

@ -330,7 +330,7 @@ fn search_for_vtable(vcx: &VtableContext,
ty::populate_implementations_for_trait_if_necessary(tcx,
trait_ref.def_id);
// XXX: this is a bad way to do this, since we do
// FIXME: this is a bad way to do this, since we do
// pointless allocations.
let impls = {
let trait_impls = tcx.trait_impls.borrow();
@ -371,7 +371,7 @@ fn search_for_vtable(vcx: &VtableContext,
// we're trying to cast to some_trait. If not, then we try
// the next impl.
//
// XXX: document a bit more what this means
// FIXME: document a bit more what this means
//
// FIXME(#5781) this should be mk_eqty not mk_subty
let ty::ty_param_substs_and_ty {

View File

@ -309,7 +309,7 @@ impl CoherenceChecker {
// Nothing to do.
}
Some(base_type_def_id) => {
// XXX: Gather up default methods?
// FIXME: Gather up default methods?
if associated_traits.len() == 0 {
self.add_inherent_impl(base_type_def_id, implementation);
}

View File

@ -323,7 +323,7 @@ impl fmt::Default for clean::Type {
},
arrow = match decl.decl.output { clean::Unit => "no", _ => "yes" },
ret = decl.decl.output);
// XXX: where are bounds and lifetimes printed?!
// FIXME: where are bounds and lifetimes printed?!
}
clean::BareFunction(ref decl) => {
write!(f.buf, "{}{}fn{}{}",
@ -481,7 +481,7 @@ impl fmt::Default for clean::ViewPath {
impl fmt::Default for clean::ImportSource {
fn fmt(v: &clean::ImportSource, f: &mut fmt::Formatter) {
match v.did {
// XXX: shouldn't be restricted to just local imports
// FIXME: shouldn't be restricted to just local imports
Some(did) if ast_util::is_local(did) => {
resolved_path(f.buf, did.node, &v.path, true);
}
@ -498,7 +498,7 @@ impl fmt::Default for clean::ImportSource {
impl fmt::Default for clean::ViewListIdent {
fn fmt(v: &clean::ViewListIdent, f: &mut fmt::Formatter) {
match v.source {
// XXX: shouldn't be limited to just local imports
// FIXME: shouldn't be limited to just local imports
Some(did) if ast_util::is_local(did) => {
let path = clean::Path {
global: false,

View File

@ -301,7 +301,7 @@ fn json_input(input: &str) -> Result<Output, ~str> {
}
None => return Err(~"malformed json"),
};
// XXX: this should read from the "plugins" field, but currently
// FIXME: this should read from the "plugins" field, but currently
// Json doesn't implement decodable...
let plugin_output = ~[];
Ok((crate, plugin_output))

View File

@ -459,7 +459,7 @@ impl PkgSrc {
subcfgs,
opt,
what);
// XXX: result is an Option<Path>. The following code did not take that
// FIXME: result is an Option<Path>. The following code did not take that
// into account. I'm not sure if the workcache really likes seeing the
// output as "Some(\"path\")". But I don't know what to do about it.
// FIXME (#9639): This needs to handle non-utf8 paths

View File

@ -259,7 +259,7 @@ impl Drop for Request {
}
}
/// XXX: Loop(*handle) is buggy with destructors. Normal structs
/// FIXME: Loop(*handle) is buggy with destructors. Normal structs
/// with dtors may not be destructured, but tuple structs can,
/// but the results are not correct.
pub struct Loop {
@ -284,7 +284,7 @@ impl Loop {
}
}
// XXX: Need to define the error constants like EOF so they can be
// FIXME: Need to define the error constants like EOF so they can be
// compared to the UvError type
pub struct UvError(c_int);
@ -349,7 +349,7 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError {
uvll::EADDRNOTAVAIL => io::ConnectionRefused,
err => {
uvdebug!("uverr.code {}", err as int);
// XXX: Need to map remaining uv error types
// FIXME: Need to map remaining uv error types
io::OtherIoError
}
};

View File

@ -343,7 +343,7 @@ impl rtio::RtioTcpListener for TcpListener {
let mut acceptor = ~TcpAcceptor { listener: self };
let _m = acceptor.fire_homing_missile();
// XXX: the 128 backlog should be configurable
// FIXME: the 128 backlog should be configurable
match unsafe { uvll::uv_listen(acceptor.listener.handle, 128, listen_cb) } {
0 => Ok(acceptor as ~rtio::RtioTcpAcceptor),
n => Err(uv_error_to_io_error(UvError(n))),

View File

@ -179,7 +179,7 @@ impl RtioUnixListener for PipeListener {
let mut acceptor = ~PipeAcceptor { listener: self };
let _m = acceptor.fire_homing_missile();
// XXX: the 128 backlog should be configurable
// FIXME: the 128 backlog should be configurable
match unsafe { uvll::uv_listen(acceptor.listener.pipe, 128, listen_cb) } {
0 => Ok(acceptor as ~RtioUnixAcceptor),
n => Err(uv_error_to_io_error(UvError(n))),

View File

@ -157,7 +157,7 @@ extern fn read_cb(handle: *uvll::uv_stream_t, nread: ssize_t, _buf: *Buf) {
};
// Stop reading so that no read callbacks are
// triggered before the user calls `read` again.
// XXX: Is there a performance impact to calling
// FIXME: Is there a performance impact to calling
// stop here?
unsafe { assert_eq!(uvll::uv_read_stop(handle), 0); }
rcx.result = nread;

View File

@ -361,7 +361,7 @@ fn request_sanity_check() {
}
}
// XXX Event loops ignore SIGPIPE by default.
// FIXME Event loops ignore SIGPIPE by default.
pub unsafe fn loop_new() -> *c_void {
return rust_uv_loop_new();
}

View File

@ -55,7 +55,7 @@ unsafe fn each_live_alloc(read_next_before: bool,
#[cfg(unix)]
fn debug_mem() -> bool {
// XXX: Need to port the environment struct to newsched
// FIXME: Need to port the environment struct to newsched
false
}

View File

@ -780,7 +780,7 @@ impl<'a> Formatter<'a> {
rt::Keyword(parse::One) => value == 1,
rt::Keyword(parse::Two) => value == 2,
// XXX: Few/Many should have a user-specified boundary
// FIXME: Few/Many should have a user-specified boundary
// One possible option would be in the function
// pointer of the 'arg: Argument' struct.
rt::Keyword(parse::Few) => value < 8,
@ -1085,7 +1085,7 @@ integer!(i64, u64)
macro_rules! floating(($ty:ident) => {
impl Float for $ty {
fn fmt(f: &$ty, fmt: &mut Formatter) {
// XXX: this shouldn't perform an allocation
// FIXME: this shouldn't perform an allocation
let s = match fmt.precision {
Some(i) => ::$ty::to_str_exact(f.abs(), i),
None => ::$ty::to_str_digits(f.abs(), 6)
@ -1096,7 +1096,7 @@ macro_rules! floating(($ty:ident) => {
impl LowerExp for $ty {
fn fmt(f: &$ty, fmt: &mut Formatter) {
// XXX: this shouldn't perform an allocation
// FIXME: this shouldn't perform an allocation
let s = match fmt.precision {
Some(i) => ::$ty::to_str_exp_exact(f.abs(), i, false),
None => ::$ty::to_str_exp_digits(f.abs(), 6, false)
@ -1107,7 +1107,7 @@ macro_rules! floating(($ty:ident) => {
impl UpperExp for $ty {
fn fmt(f: &$ty, fmt: &mut Formatter) {
// XXX: this shouldn't perform an allocation
// FIXME: this shouldn't perform an allocation
let s = match fmt.precision {
Some(i) => ::$ty::to_str_exp_exact(f.abs(), i, true),
None => ::$ty::to_str_exp_digits(f.abs(), 6, true)

View File

@ -10,8 +10,8 @@
//! Utility mixins that apply to all Readers and Writers
// XXX: Not sure how this should be structured
// XXX: Iteration should probably be considered separately
// FIXME: Not sure how this should be structured
// FIXME: Iteration should probably be considered separately
use container::Container;
use iter::Iterator;

View File

@ -84,7 +84,7 @@ Some examples of obvious things you might want to do
```
* Make an simple HTTP request
XXX This needs more improvement: TcpStream constructor taking &str,
FIXME This needs more improvement: TcpStream constructor taking &str,
`write_str` and `write_line` methods.
```rust,should_fail
@ -101,7 +101,7 @@ Some examples of obvious things you might want to do
* Connect based on URL? Requires thinking about where the URL type lives
and how to make protocol handlers extensible, e.g. the "tcp" protocol
yields a `TcpStream`.
XXX this is not implemented now.
FIXME this is not implemented now.
```rust
// connect("tcp://localhost:8080");
@ -209,7 +209,7 @@ if error.is_some() {
# ::std::io::fs::unlink(&Path::new("diary.txt"));
```
XXX: Need better condition handling syntax
FIXME: Need better condition handling syntax
In this case the condition handler will have the opportunity to
inspect the IoError raised by either the call to `new` or the call to
@ -232,8 +232,8 @@ to errors similar to null pointer dereferences.
In particular code written to ignore errors and expect conditions to be unhandled
will start passing around null or zero objects when wrapped in a condition handler.
* XXX: How should we use condition handlers that return values?
* XXX: Should EOF raise default conditions when EOF is not an error?
* FIXME: How should we use condition handlers that return values?
* FIXME: Should EOF raise default conditions when EOF is not an error?
# Issues with i/o scheduler affinity, work stealing, task pinning
@ -263,7 +263,7 @@ Out of scope
* Async I/O. We'll probably want it eventually
# XXX Questions and issues
# FIXME Questions and issues
* Should default constructors take `Path` or `&str`? `Path` makes simple cases verbose.
Overloading would be nice.
@ -375,7 +375,7 @@ static DEFAULT_BUF_SIZE: uint = 1024 * 64;
/// The type passed to I/O condition handlers to indicate error
///
/// # XXX
/// # FIXME
///
/// Is something like this sufficient? It's kind of archaic
pub struct IoError {
@ -446,7 +446,7 @@ impl ToStr for IoErrorKind {
}
}
// XXX: Can't put doc comments on macros
// FIXME: Can't put doc comments on macros
// Raised by `I/O` operations on error.
condition! {
pub io_error: IoError -> ();
@ -491,9 +491,9 @@ pub trait Reader {
/// Raises the `io_error` condition on error. If the condition
/// is handled then no guarantee is made about the number of bytes
/// read and the contents of `buf`. If the condition is handled
/// returns `None` (XXX see below).
/// returns `None` (FIXME see below).
///
/// # XXX
/// # FIXME
///
/// * Should raise_default error on eof?
/// * If the condition is handled it should still return the bytes read,
@ -1218,7 +1218,7 @@ pub enum SeekStyle {
SeekCur,
}
/// # XXX
/// # FIXME
/// * Are `u64` and `i64` the right choices?
pub trait Seek {
/// Return position of file cursor in the stream
@ -1228,7 +1228,7 @@ pub trait Seek {
///
/// A successful seek clears the EOF indicator.
///
/// # XXX
/// # FIXME
///
/// * What is the behavior when seeking past the end of a stream?
fn seek(&mut self, pos: i64, style: SeekStyle);

View File

@ -91,7 +91,7 @@ pub fn get_host_addresses(host: &str) -> Option<~[IpAddr]> {
///
/// On failure, this will raise on the `io_error` condition.
///
/// XXX: this is not public because the `Hint` structure is not ready for public
/// FIXME: this is not public because the `Hint` structure is not ready for public
/// consumption just yet.
fn lookup(hostname: Option<&str>, servname: Option<&str>, hint: Option<Hint>)
-> Option<~[Info]> {

View File

@ -584,7 +584,7 @@ mod test {
})
iotest!(fn socket_and_peer_name_ip6() {
// XXX: peer name is not consistent
// FIXME: peer name is not consistent
//peer_name(next_test_ip6());
socket_name(next_test_ip6());
})

View File

@ -51,7 +51,7 @@ pub trait Sample<Support> {
/// Since no state is recorded, each sample is (statistically)
/// independent of all others, assuming the `Rng` used has this
/// property.
// XXX maybe having this separate is overkill (the only reason is to
// FIXME maybe having this separate is overkill (the only reason is to
// take &self rather than &mut self)? or maybe this should be the
// trait called `Sample` and the other should be `DependentSample`.
pub trait IndependentSample<Support>: Sample<Support> {

View File

@ -108,7 +108,7 @@ fn do_iter_crate_map<'a>(
/// Iterates recursively over `crate_map` and all child crate maps
pub fn iter_crate_map<'a>(crate_map: &'a CrateMap<'a>, f: |&ModEntry|) {
// XXX: use random numbers as keys from the OS-level RNG when there is a nice
// FIXME: use random numbers as keys from the OS-level RNG when there is a nice
// way to do this
let mut v: HashSet<*CrateMap<'a>> = HashSet::with_capacity_and_keys(0, 0, 32);
do_iter_crate_map(crate_map, f, &mut v);

View File

@ -293,7 +293,7 @@ impl Drop for MemoryRegion {
#[inline]
pub unsafe fn local_malloc(td: *u8, size: uint) -> *u8 {
// XXX: Unsafe borrow for speed. Lame.
// FIXME: Unsafe borrow for speed. Lame.
let task: Option<*mut Task> = Local::try_unsafe_borrow();
match task {
Some(task) => {
@ -306,7 +306,7 @@ pub unsafe fn local_malloc(td: *u8, size: uint) -> *u8 {
// A little compatibility function
#[inline]
pub unsafe fn local_free(ptr: *u8) {
// XXX: Unsafe borrow for speed. Lame.
// FIXME: Unsafe borrow for speed. Lame.
let task_ptr: Option<*mut Task> = Local::try_unsafe_borrow();
match task_ptr {
Some(task) => {

View File

@ -52,7 +52,7 @@ Several modules in `core` are clients of `rt`:
*/
// XXX: this should not be here.
// FIXME: this should not be here.
#[allow(missing_doc)];
use any::Any;
@ -71,7 +71,7 @@ pub use self::util::default_sched_threads;
// Export unwinding facilities used by the failure macros
pub use self::unwind::{begin_unwind, begin_unwind_raw};
// XXX: these probably shouldn't be public...
// FIXME: these probably shouldn't be public...
#[doc(hidden)]
pub mod shouldnt_be_public {
pub use super::local_ptr::native::maybe_tls_key;
@ -155,7 +155,7 @@ pub trait Runtime {
/// The (low, high) edges of the current stack.
fn stack_bounds(&self) -> (uint, uint); // (lo, hi)
// XXX: This is a serious code smell and this should not exist at all.
// FIXME: This is a serious code smell and this should not exist at all.
fn wrap(~self) -> ~Any;
}
@ -165,7 +165,7 @@ pub trait Runtime {
/// the crate's logging flags, registering GC
/// metadata, and storing the process arguments.
pub fn init(argc: int, argv: **u8) {
// XXX: Derefing these pointers is not safe.
// FIXME: Derefing these pointers is not safe.
// Need to propagate the unsafety to `start`.
unsafe {
args::init(argc, argv);

View File

@ -86,7 +86,7 @@ pub struct LocalIo<'a> {
#[unsafe_destructor]
impl<'a> Drop for LocalIo<'a> {
fn drop(&mut self) {
// XXX(pcwalton): Do nothing here for now, but eventually we may want
// FIXME(pcwalton): Do nothing here for now, but eventually we may want
// something. For now this serves to make `LocalIo` noncopyable.
}
}
@ -143,7 +143,7 @@ impl<'a> LocalIo<'a> {
/// Returns the underlying I/O factory as a trait reference.
#[inline]
pub fn get<'a>(&'a mut self) -> &'a mut IoFactory {
// XXX(pcwalton): I think this is actually sound? Could borrow check
// FIXME(pcwalton): I think this is actually sound? Could borrow check
// allow this safely?
unsafe {
cast::transmute_copy(&self.factory)

View File

@ -212,7 +212,7 @@ impl Task {
// pretty sketchy and involves shuffling vtables of trait objects
// around, but it gets the job done.
//
// XXX: This function is a serious code smell and should be avoided at
// FIXME: This function is a serious code smell and should be avoided at
// all costs. I have yet to think of a method to avoid this
// function, and I would be saddened if more usage of the function
// crops up.

View File

@ -20,7 +20,7 @@ use unstable::running_on_valgrind;
use vec::ImmutableVector;
// Indicates whether we should perform expensive sanity checks, including rtassert!
// XXX: Once the runtime matures remove the `true` below to turn off rtassert, etc.
// FIXME: Once the runtime matures remove the `true` below to turn off rtassert, etc.
pub static ENFORCE_SANITY: bool = true || !cfg!(rtopt) || cfg!(rtdebug) || cfg!(rtassert);
/// Get the number of cores available

View File

@ -119,7 +119,7 @@ impl Str for SendStr {
fn as_slice<'r>(&'r self) -> &'r str {
match *self {
SendStrOwned(ref s) => s.as_slice(),
// XXX: Borrowchecker doesn't recognize lifetime as static unless prompted
// FIXME: Borrowchecker doesn't recognize lifetime as static unless prompted
// SendStrStatic(s) => s.as_slice()
SendStrStatic(s) => {let tmp: &'static str = s; tmp}
}

View File

@ -45,7 +45,7 @@
// NB: the "buffer pool" strategy is not done for speed, but rather for
// correctness. For more info, see the comment on `swap_buffer`
// XXX: all atomic operations in this module use a SeqCst ordering. That is
// FIXME: all atomic operations in this module use a SeqCst ordering. That is
// probably overkill
use cast;

View File

@ -43,7 +43,7 @@ use sync::atomics::{AtomicPtr, Relaxed, AtomicUint, Acquire, Release};
// Node within the linked list queue of messages to send
struct Node<T> {
// XXX: this could be an uninitialized T if we're careful enough, and
// FIXME: this could be an uninitialized T if we're careful enough, and
// that would reduce memory usage (and be a bit faster).
// is it worth it?
value: Option<T>, // nullable for re-use of nodes
@ -225,7 +225,7 @@ impl<T: Send, P: Send> State<T, P> {
if self.cache_bound == 0 {
self.tail_prev.store(tail, Release);
} else {
// XXX: this is dubious with overflow.
// FIXME: this is dubious with overflow.
let additions = self.cache_additions.load(Relaxed);
let subtractions = self.cache_subtractions.load(Relaxed);
let size = additions - subtractions;

View File

@ -86,7 +86,7 @@ pub fn path_elem_to_str(pe: PathElem, itr: @IdentInterner) -> ~str {
/// from, even if it's hard to read (previously they would all just be
/// listed as `__extensions__::method_name::hash`, with no indication
/// of the type).
// XXX: these dollar signs and the names in general are actually a
// FIXME: these dollar signs and the names in general are actually a
// relic of $ being one of the very few valid symbol names on
// unix. These kinds of details shouldn't be exposed way up here
// in the ast.

View File

@ -41,7 +41,7 @@ pub struct BytePos(u32);
#[deriving(Eq,IterBytes, Ord)]
pub struct CharPos(uint);
// XXX: Lots of boilerplate in these impls, but so far my attempts to fix
// FIXME: Lots of boilerplate in these impls, but so far my attempts to fix
// have been unsuccessful
impl Pos for BytePos {

View File

@ -179,7 +179,7 @@ pub trait AstBuilder {
name: Ident, attrs: ~[ast::Attribute], node: ast::Item_) -> @ast::Item;
fn arg(&self, span: Span, name: Ident, ty: P<ast::Ty>) -> ast::Arg;
// XXX unused self
// FIXME unused self
fn fn_decl(&self, inputs: ~[ast::Arg], output: P<ast::Ty>) -> P<ast::FnDecl>;
fn item_fn_poly(&self,
@ -724,7 +724,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
}
}
// XXX unused self
// FIXME unused self
fn fn_decl(&self, inputs: ~[ast::Arg], output: P<ast::Ty>) -> P<ast::FnDecl> {
P(ast::FnDecl {
inputs: inputs,
@ -736,7 +736,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
fn item(&self, span: Span,
name: Ident, attrs: ~[ast::Attribute], node: ast::Item_) -> @ast::Item {
// XXX: Would be nice if our generated code didn't violate
// FIXME: Would be nice if our generated code didn't violate
// Rust coding conventions
@ast::Item { ident: name,
attrs: attrs,

View File

@ -115,7 +115,7 @@ pub fn expand_expr(e: @ast::Expr, fld: &mut MacroExpander) -> @ast::Expr {
// Keep going, outside-in.
//
// XXX(pcwalton): Is it necessary to clone the
// FIXME(pcwalton): Is it necessary to clone the
// node here?
let fully_expanded =
fld.fold_expr(marked_after).node.clone();

View File

@ -173,7 +173,7 @@ fn lockstep_iter_size(t: &TokenTree, r: &TtReader) -> LockstepIterSize {
// return the next token from the TtReader.
// EFFECT: advances the reader's token field
pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
// XXX(pcwalton): Bad copy?
// FIXME(pcwalton): Bad copy?
let ret_val = TokenAndSpan {
tok: r.cur_tok.get(),
sp: r.cur_span.get(),
@ -231,7 +231,7 @@ pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
}
loop { /* because it's easiest, this handles `TTDelim` not starting
with a `TTTok`, even though it won't happen */
// XXX(pcwalton): Bad copy.
// FIXME(pcwalton): Bad copy.
match r.stack.get().forest[r.stack.get().idx.get()].clone() {
TTDelim(tts) => {
r.stack.set(@TtFrame {
@ -250,7 +250,7 @@ pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
return ret_val;
}
TTSeq(sp, tts, sep, zerok) => {
// XXX(pcwalton): Bad copy.
// FIXME(pcwalton): Bad copy.
let t = TTSeq(sp, tts, sep.clone(), zerok);
match lockstep_iter_size(&t, r) {
LisUnconstrained => {
@ -306,7 +306,7 @@ pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
return ret_val;
}
MatchedNonterminal(ref other_whole_nt) => {
// XXX(pcwalton): Bad copy.
// FIXME(pcwalton): Bad copy.
r.cur_span.set(sp);
r.cur_tok.set(INTERPOLATED((*other_whole_nt).clone()));
r.stack.get().idx.set(r.stack.get().idx.get() + 1u);

View File

@ -123,7 +123,7 @@ impl Reader for StringReader {
}
fn span_diag(@self) -> @SpanHandler { self.span_diagnostic }
fn peek(@self) -> TokenAndSpan {
// XXX(pcwalton): Bad copy!
// FIXME(pcwalton): Bad copy!
TokenAndSpan {
tok: self.peek_tok.get(),
sp: self.peek_span.get(),

View File

@ -1237,7 +1237,7 @@ impl Parser {
Parser::token_is_lifetime(&self.token) {
// CLOSURE
//
// XXX(pcwalton): Eventually `token::LT` will not unambiguously
// FIXME(pcwalton): Eventually `token::LT` will not unambiguously
// introduce a closure, once procs can have lifetime bounds. We
// will need to refactor the grammar a little bit at that point.
@ -3949,7 +3949,7 @@ impl Parser {
let generics = self.parse_generics();
// This is a new-style impl declaration.
// XXX: clownshoes
// FIXME: clownshoes
let ident = special_idents::clownshoes_extensions;
// Special case: if the next identifier that follows is '(', don't
@ -4071,7 +4071,7 @@ impl Parser {
token_str))
}
let _ = ast::DUMMY_NODE_ID; // XXX: Workaround for crazy bug.
let _ = ast::DUMMY_NODE_ID; // FIXME: Workaround for crazy bug.
let new_id = ast::DUMMY_NODE_ID;
(class_name,
ItemStruct(@ast::StructDef {

View File

@ -2311,7 +2311,7 @@ pub fn print_string(s: &mut State, st: &str, style: ast::StrStyle) {
word(&mut s.s, st);
}
// XXX(pcwalton): A nasty function to extract the string from an `io::Writer`
// FIXME(pcwalton): A nasty function to extract the string from an `io::Writer`
// that we "know" to be a `MemWriter` that works around the lack of checked
// downcasts.
unsafe fn get_mem_writer(writer: &mut ~io::Writer) -> ~str {

View File

@ -25,7 +25,7 @@
void*
rust_uv_loop_new() {
// XXX libuv doesn't always ignore SIGPIPE even though we don't need it.
// FIXME libuv doesn't always ignore SIGPIPE even though we don't need it.
#ifndef __WIN32__
signal(SIGPIPE, SIG_IGN);
#endif

View File

@ -56,7 +56,7 @@ static HOMO_SAPIENS: [AminoAcid, ..4] = [
AminoAcid { c: 't' as u8, p: 0.3015094502008 },
];
// XXX: Use map().
// FIXME: Use map().
fn sum_and_scale(a: &'static [AminoAcid]) -> ~[AminoAcid] {
let mut result = ~[];
let mut p = 0f32;

View File

@ -49,7 +49,7 @@ impl Code {
code
}
// XXX: Inefficient.
// FIXME: Inefficient.
fn unpack(&self, frame: i32) -> ~str {
let mut key = **self;
let mut result = ~[];

View File

@ -22,7 +22,7 @@ mod cross_crate {
use self::lint_stability::*;
fn test() {
// XXX: attributes on methods are not encoded cross crate.
// FIXME: attributes on methods are not encoded cross crate.
let foo = MethodTester;
deprecated(); //~ ERROR use of deprecated item

View File

@ -37,7 +37,7 @@ pub fn main() {
(@"test").test_imm();
(&"test").test_imm();
// XXX: Other types of mutable vecs don't currently exist
// FIXME: Other types of mutable vecs don't currently exist
// NB: We don't do this double autoreffing for &mut self because that would
// allow creating a mutable pointer to a temporary, which would be a source