auto merge of #11817 : salemtalha/rust/master, r=brson
Fixes Issue #11815
This commit is contained in:
commit
d3f70f5a7d
73 changed files with 121 additions and 122 deletions
|
@ -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: *** stage2 and later will not be built ***)
|
||||||
CFG_INFO := $(info cfg:)
|
CFG_INFO := $(info cfg:)
|
||||||
|
|
||||||
#XXX This is surely busted
|
#FIXME This is surely busted
|
||||||
all: $(SREQ1$(CFG_BUILD)) $(GENERATED) docs
|
all: $(SREQ1$(CFG_BUILD)) $(GENERATED) docs
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
|
@ -2895,7 +2895,7 @@ and only if that results in no match look at items you brought in
|
||||||
scope with corresponding `use` statements.
|
scope with corresponding `use` statements.
|
||||||
|
|
||||||
~~~ {.ignore}
|
~~~ {.ignore}
|
||||||
# // XXX: Allow unused import in doc test
|
# // FIXME: Allow unused import in doc test
|
||||||
use farm::cow;
|
use farm::cow;
|
||||||
// ...
|
// ...
|
||||||
# mod farm { pub fn cow() { println!("Hidden ninja cow is hidden.") } }
|
# mod farm { pub fn cow() { println!("Hidden ninja cow is hidden.") } }
|
||||||
|
|
|
@ -596,7 +596,7 @@ define CFG_MAKE_TOOLCHAIN
|
||||||
else
|
else
|
||||||
|
|
||||||
# For the ARM and MIPS crosses, use the toolchain assembler
|
# 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_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
|
||||||
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
|
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,8 @@ try:
|
||||||
openhook=fileinput.hook_encoded("utf-8")):
|
openhook=fileinput.hook_encoded("utf-8")):
|
||||||
|
|
||||||
if fileinput.filename().find("tidy.py") == -1:
|
if fileinput.filename().find("tidy.py") == -1:
|
||||||
if line.find("FIXME") != -1:
|
if line.find("// XXX") != -1:
|
||||||
if re.search("FIXME.*#\d+", line) == None:
|
report_err("XXX is no longer necessary, use FIXME")
|
||||||
report_err("FIXME without issue number")
|
|
||||||
if line.find("TODO") != -1:
|
if line.find("TODO") != -1:
|
||||||
report_err("TODO is deprecated; use FIXME")
|
report_err("TODO is deprecated; use FIXME")
|
||||||
match = re.match(r'^.*//\s*(NOTE.*)$', line)
|
match = re.match(r'^.*//\s*(NOTE.*)$', line)
|
||||||
|
|
|
@ -276,7 +276,7 @@ impl Arena {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn alloc<'a, T>(&'a self, op: || -> T) -> &'a T {
|
pub fn alloc<'a, T>(&'a self, op: || -> T) -> &'a T {
|
||||||
unsafe {
|
unsafe {
|
||||||
// XXX: Borrow check
|
// FIXME: Borrow check
|
||||||
let this = transmute_mut(self);
|
let this = transmute_mut(self);
|
||||||
if intrinsics::needs_drop::<T>() {
|
if intrinsics::needs_drop::<T>() {
|
||||||
this.alloc_nonpod(op)
|
this.alloc_nonpod(op)
|
||||||
|
|
|
@ -630,7 +630,7 @@ pub mod writer {
|
||||||
|
|
||||||
// FIXME (#2741): Provide a function to write the standard ebml header.
|
// FIXME (#2741): Provide a function to write the standard ebml header.
|
||||||
impl<'a> Encoder<'a> {
|
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> {
|
pub unsafe fn unsafe_clone(&self) -> Encoder<'a> {
|
||||||
Encoder {
|
Encoder {
|
||||||
writer: cast::transmute_copy(&self.writer),
|
writer: cast::transmute_copy(&self.writer),
|
||||||
|
|
|
@ -93,7 +93,7 @@ pub fn glob_with(pattern: &str, options: MatchOptions) -> Paths {
|
||||||
let pat_root = Path::new(pattern).root_path();
|
let pat_root = Path::new(pattern).root_path();
|
||||||
if pat_root.is_some() {
|
if pat_root.is_some() {
|
||||||
if check_windows_verbatim(pat_root.get_ref()) {
|
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.
|
// 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: ~[] };
|
return Paths { root: root, dir_patterns: ~[], options: options, todo: ~[] };
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ fn decode_inner(s: &str, full_url: bool) -> ~str {
|
||||||
let mut bytes = [0, 0];
|
let mut bytes = [0, 0];
|
||||||
match rdr.read(bytes) {
|
match rdr.read(bytes) {
|
||||||
Some(2) => {}
|
Some(2) => {}
|
||||||
_ => fail!() // XXX: malformed url?
|
_ => fail!() // FIXME: malformed url?
|
||||||
}
|
}
|
||||||
let ch = uint::parse_bytes(bytes, 16u).unwrap() as u8 as char;
|
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];
|
let mut bytes = [0, 0];
|
||||||
match rdr.read(bytes) {
|
match rdr.read(bytes) {
|
||||||
Some(2) => {}
|
Some(2) => {}
|
||||||
_ => fail!() // XXX: malformed?
|
_ => fail!() // FIXME: malformed?
|
||||||
}
|
}
|
||||||
uint::parse_bytes(bytes, 16u).unwrap() as u8 as char
|
uint::parse_bytes(bytes, 16u).unwrap() as u8 as char
|
||||||
}
|
}
|
||||||
|
|
|
@ -413,7 +413,7 @@ impl<'a> Prep<'a> {
|
||||||
let (port, chan) = Chan::new();
|
let (port, chan) = Chan::new();
|
||||||
let blk = bo.take_unwrap();
|
let blk = bo.take_unwrap();
|
||||||
|
|
||||||
// XXX: What happens if the task fails?
|
// FIXME: What happens if the task fails?
|
||||||
do spawn {
|
do spawn {
|
||||||
let mut exe = Exec {
|
let mut exe = Exec {
|
||||||
discovered_inputs: WorkMap::new(),
|
discovered_inputs: WorkMap::new(),
|
||||||
|
|
|
@ -139,7 +139,7 @@ impl EventLoop for BasicLoop {
|
||||||
self.work.push(f);
|
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 {
|
fn pausable_idle_callback(&mut self, cb: ~Callback) -> ~PausableIdleCallback {
|
||||||
let callback = ~BasicPausable::new(self, cb);
|
let callback = ~BasicPausable::new(self, cb);
|
||||||
rtassert!(self.idle.is_none());
|
rtassert!(self.idle.is_none());
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// XXX: this file probably shouldn't exist
|
// FIXME: this file probably shouldn't exist
|
||||||
|
|
||||||
#[macro_escape];
|
#[macro_escape];
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
// Indicates whether we should perform expensive sanity checks, including rtassert!
|
// 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);
|
pub static ENFORCE_SANITY: bool = true || !cfg!(rtopt) || cfg!(rtdebug) || cfg!(rtassert);
|
||||||
|
|
||||||
macro_rules! rterrln (
|
macro_rules! rterrln (
|
||||||
|
|
|
@ -32,7 +32,7 @@ use task::{TypeSched, GreenTask, HomeSched, AnySched};
|
||||||
/// struct. The scheduler struct acts like a baton, all scheduling
|
/// struct. The scheduler struct acts like a baton, all scheduling
|
||||||
/// actions are transfers of the baton.
|
/// 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.
|
/// in too much allocation and too many events.
|
||||||
pub struct Scheduler {
|
pub struct Scheduler {
|
||||||
/// ID number of the pool that this scheduler is a member of. When
|
/// ID number of the pool that this scheduler is a member of. When
|
||||||
|
@ -171,7 +171,7 @@ impl Scheduler {
|
||||||
return sched;
|
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.
|
// the scheduler itself doesn't have to call event_loop.run.
|
||||||
// That will be important for embedding the runtime into external
|
// That will be important for embedding the runtime into external
|
||||||
// event loops.
|
// 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
|
// complaining
|
||||||
type UnsafeTaskReceiver = raw::Closure;
|
type UnsafeTaskReceiver = raw::Closure;
|
||||||
trait ClosureConverter {
|
trait ClosureConverter {
|
||||||
|
|
|
@ -61,7 +61,7 @@ impl Stack {
|
||||||
valgrind_id: 0
|
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 {
|
stk.valgrind_id = unsafe {
|
||||||
rust_valgrind_stack_register(stk.start(), stk.end())
|
rust_valgrind_stack_register(stk.start(), stk.end())
|
||||||
};
|
};
|
||||||
|
@ -117,7 +117,7 @@ fn protect_last_page(stack: &MemoryMap) -> bool {
|
||||||
impl Drop for Stack {
|
impl Drop for Stack {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
unsafe {
|
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);
|
rust_valgrind_stack_deregister(self.valgrind_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -674,7 +674,7 @@ pub fn chown(p: &CString, uid: int, gid: int) -> IoResult<()> {
|
||||||
pub fn readlink(p: &CString) -> IoResult<Path> {
|
pub fn readlink(p: &CString) -> IoResult<Path> {
|
||||||
return os_readlink(p);
|
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)]
|
#[cfg(windows)]
|
||||||
fn os_readlink(p: &CString) -> IoResult<Path> {
|
fn os_readlink(p: &CString) -> IoResult<Path> {
|
||||||
let handle = unsafe {
|
let handle = unsafe {
|
||||||
|
@ -709,7 +709,7 @@ pub fn readlink(p: &CString) -> IoResult<Path> {
|
||||||
let p = p.with_ref(|p| p);
|
let p = p.with_ref(|p| p);
|
||||||
let mut len = unsafe { libc::pathconf(p, libc::_PC_NAME_MAX) };
|
let mut len = unsafe { libc::pathconf(p, libc::_PC_NAME_MAX) };
|
||||||
if len == -1 {
|
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);
|
let mut buf = vec::with_capacity::<u8>(len as uint);
|
||||||
match retry(|| unsafe {
|
match retry(|| unsafe {
|
||||||
|
@ -877,7 +877,7 @@ pub fn stat(p: &CString) -> IoResult<io::FileStat> {
|
||||||
pub fn lstat(p: &CString) -> IoResult<io::FileStat> {
|
pub fn lstat(p: &CString) -> IoResult<io::FileStat> {
|
||||||
return os_lstat(p);
|
return os_lstat(p);
|
||||||
|
|
||||||
// XXX: windows implementation is missing
|
// FIXME: windows implementation is missing
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn os_lstat(_p: &CString) -> IoResult<io::FileStat> {
|
fn os_lstat(_p: &CString) -> IoResult<io::FileStat> {
|
||||||
Err(super::unimpl())
|
Err(super::unimpl())
|
||||||
|
|
|
@ -97,7 +97,7 @@ fn translate_error(errno: i32, detail: bool) -> IoError {
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
fn get_err(errno: i32) -> (io::IoErrorKind, &'static str) {
|
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 {
|
match errno {
|
||||||
libc::EOF => (io::EndOfFile, "end of file"),
|
libc::EOF => (io::EndOfFile, "end of file"),
|
||||||
libc::ECONNREFUSED => (io::ConnectionRefused, "connection refused"),
|
libc::ECONNREFUSED => (io::ConnectionRefused, "connection refused"),
|
||||||
|
|
|
@ -104,7 +104,7 @@ fn helper(input: libc::c_int, messages: Port<Req>) {
|
||||||
let mut bits = [0, ..8];
|
let mut bits = [0, ..8];
|
||||||
// drain the timerfd of how many times its fired
|
// 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?
|
// times?
|
||||||
FileDesc::new(fd, false).inner_read(bits);
|
FileDesc::new(fd, false).inner_read(bits);
|
||||||
let remove = {
|
let remove = {
|
||||||
|
|
|
@ -330,7 +330,7 @@ fn parse_crate_attrs(sess: session::Session,
|
||||||
/// The diagnostic emitter yielded to the procedure should be used for reporting
|
/// The diagnostic emitter yielded to the procedure should be used for reporting
|
||||||
/// errors of the compiler.
|
/// errors of the compiler.
|
||||||
pub fn monitor(f: proc(@diagnostic::Emitter)) {
|
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
|
// rustc needs a lot of stack! When optimizations are disabled, it needs
|
||||||
// even *more* stack than usual as well.
|
// even *more* stack than usual as well.
|
||||||
#[cfg(rtopt)]
|
#[cfg(rtopt)]
|
||||||
|
@ -341,7 +341,7 @@ pub fn monitor(f: proc(@diagnostic::Emitter)) {
|
||||||
let mut task_builder = task::task();
|
let mut task_builder = task::task();
|
||||||
task_builder.name("rustc");
|
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.
|
// then *don't* set it explicitly.
|
||||||
if os::getenv("RUST_MIN_STACK").is_none() {
|
if os::getenv("RUST_MIN_STACK").is_none() {
|
||||||
task_builder.opts.stack_size = Some(STACK_SIZE);
|
task_builder.opts.stack_size = Some(STACK_SIZE);
|
||||||
|
|
|
@ -1275,7 +1275,7 @@ fn encode_info_for_item(ecx: &EncodeContext,
|
||||||
// If this is a static method, we've already encoded
|
// If this is a static method, we've already encoded
|
||||||
// this.
|
// this.
|
||||||
if method_ty.explicit_self != SelfStatic {
|
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);
|
let tpt = ty::lookup_item_type(tcx, method_def_id);
|
||||||
encode_bounds_and_type(ebml_w, ecx, &tpt);
|
encode_bounds_and_type(ebml_w, ecx, &tpt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ impl Context {
|
||||||
for lib in libs.mut_iter() {
|
for lib in libs.mut_iter() {
|
||||||
match lib.dylib {
|
match lib.dylib {
|
||||||
Some(ref p) if p.filename_str() == Some(file.as_slice()) => {
|
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());
|
lib.rlib = Some(path.clone());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ impl Context {
|
||||||
for lib in libs.mut_iter() {
|
for lib in libs.mut_iter() {
|
||||||
match lib.rlib {
|
match lib.rlib {
|
||||||
Some(ref p) if p.filename_str() == Some(file.as_slice()) => {
|
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());
|
lib.dylib = Some(path.clone());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -913,7 +913,7 @@ impl<'a,'b> ast_util::IdVisitingOperation for
|
||||||
// it is mutable. But I believe it's harmless since we generate
|
// it is mutable. But I believe it's harmless since we generate
|
||||||
// balanced EBML.
|
// balanced EBML.
|
||||||
//
|
//
|
||||||
// XXX(pcwalton): Don't copy this way.
|
// FIXME(pcwalton): Don't copy this way.
|
||||||
let mut new_ebml_w = unsafe {
|
let mut new_ebml_w = unsafe {
|
||||||
self.new_ebml_w.unsafe_clone()
|
self.new_ebml_w.unsafe_clone()
|
||||||
};
|
};
|
||||||
|
|
|
@ -416,7 +416,7 @@ impl<'a> GatherLoanCtxt<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
ty::AutoObject(..) => {
|
ty::AutoObject(..) => {
|
||||||
// XXX: Handle @Trait to &Trait casts here?
|
// FIXME: Handle @Trait to &Trait casts here?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ pub mod move_data;
|
||||||
|
|
||||||
pub struct LoanDataFlowOperator;
|
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.
|
/// yet on unit structs.
|
||||||
impl Clone for LoanDataFlowOperator {
|
impl Clone for LoanDataFlowOperator {
|
||||||
fn clone(&self) -> LoanDataFlowOperator {
|
fn clone(&self) -> LoanDataFlowOperator {
|
||||||
|
|
|
@ -148,7 +148,7 @@ pub struct Assignment {
|
||||||
|
|
||||||
pub struct MoveDataFlowOperator;
|
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.
|
/// yet on unit structs.
|
||||||
impl Clone for MoveDataFlowOperator {
|
impl Clone for MoveDataFlowOperator {
|
||||||
fn clone(&self) -> MoveDataFlowOperator {
|
fn clone(&self) -> MoveDataFlowOperator {
|
||||||
|
@ -160,7 +160,7 @@ pub type MoveDataFlow = DataFlowContext<MoveDataFlowOperator>;
|
||||||
|
|
||||||
pub struct AssignDataFlowOperator;
|
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.
|
/// yet on unit structs.
|
||||||
impl Clone for AssignDataFlowOperator {
|
impl Clone for AssignDataFlowOperator {
|
||||||
fn clone(&self) -> AssignDataFlowOperator {
|
fn clone(&self) -> AssignDataFlowOperator {
|
||||||
|
|
|
@ -404,7 +404,7 @@ impl ReachableContext {
|
||||||
|
|
||||||
// Step 3: Mark all destructors as reachable.
|
// 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*
|
// this properly would result in the necessity of computing *type*
|
||||||
// reachability, which might result in a compile time loss.
|
// reachability, which might result in a compile time loss.
|
||||||
fn mark_destructors_reachable(&self) {
|
fn mark_destructors_reachable(&self) {
|
||||||
|
|
|
@ -61,7 +61,7 @@ pub struct Export2 {
|
||||||
// not contain any entries from local crates.
|
// not contain any entries from local crates.
|
||||||
pub type ExternalExports = HashSet<DefId>;
|
pub type ExternalExports = HashSet<DefId>;
|
||||||
|
|
||||||
// XXX: dox
|
// FIXME: dox
|
||||||
pub type LastPrivateMap = HashMap<NodeId, LastPrivate>;
|
pub type LastPrivateMap = HashMap<NodeId, LastPrivate>;
|
||||||
|
|
||||||
pub enum LastPrivate {
|
pub enum LastPrivate {
|
||||||
|
@ -1411,7 +1411,7 @@ impl Resolver {
|
||||||
parent: ReducedGraphParent,
|
parent: ReducedGraphParent,
|
||||||
parent_public: bool) {
|
parent_public: bool) {
|
||||||
let ident = variant.node.name;
|
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
|
// here. This should be living in middle::privacy, but it's
|
||||||
// necessary to keep around in some form becaues of glob imports...
|
// necessary to keep around in some form becaues of glob imports...
|
||||||
let is_public = parent_public && variant.node.vis != ast::Private;
|
let is_public = parent_public && variant.node.vis != ast::Private;
|
||||||
|
@ -5282,7 +5282,7 @@ impl Resolver {
|
||||||
`{}`",
|
`{}`",
|
||||||
interner_get(label))),
|
interner_get(label))),
|
||||||
Some(DlDef(def @ DefLabel(_))) => {
|
Some(DlDef(def @ DefLabel(_))) => {
|
||||||
// XXX: is AllPublic correct?
|
// FIXME: is AllPublic correct?
|
||||||
self.record_def(expr.id, (def, AllPublic))
|
self.record_def(expr.id, (def, AllPublic))
|
||||||
}
|
}
|
||||||
Some(_) => {
|
Some(_) => {
|
||||||
|
|
|
@ -643,7 +643,7 @@ fn enter_opt<'r,'b>(
|
||||||
}
|
}
|
||||||
ast::PatEnum(_, ref subpats) => {
|
ast::PatEnum(_, ref subpats) => {
|
||||||
if opt_eq(tcx, &variant_opt(bcx, p.id), opt) {
|
if opt_eq(tcx, &variant_opt(bcx, p.id), opt) {
|
||||||
// XXX: Must we clone?
|
// FIXME: Must we clone?
|
||||||
match *subpats {
|
match *subpats {
|
||||||
None => Some(vec::from_elem(variant_size, dummy)),
|
None => Some(vec::from_elem(variant_size, dummy)),
|
||||||
_ => (*subpats).clone(),
|
_ => (*subpats).clone(),
|
||||||
|
|
|
@ -805,7 +805,7 @@ fn padding(size: u64) -> ValueRef {
|
||||||
C_undef(Type::array(&Type::i8(), size))
|
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]
|
#[inline]
|
||||||
fn roundup(x: u64, a: u64) -> u64 { ((x + (a - 1)) / a) * a }
|
fn roundup(x: u64, a: u64) -> u64 { ((x + (a - 1)) / a) * a }
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ pub fn trans_expr_fn<'a>(
|
||||||
|
|
||||||
let sub_path = vec::append_one(bcx.fcx.path.clone(),
|
let sub_path = vec::append_one(bcx.fcx.path.clone(),
|
||||||
PathName(special_idents::anon));
|
PathName(special_idents::anon));
|
||||||
// XXX: Bad copy.
|
// FIXME: Bad copy.
|
||||||
let s = mangle_internal_name_by_path_and_seq(ccx,
|
let s = mangle_internal_name_by_path_and_seq(ccx,
|
||||||
sub_path.clone(),
|
sub_path.clone(),
|
||||||
"expr_fn");
|
"expr_fn");
|
||||||
|
|
|
@ -283,7 +283,7 @@ pub fn const_expr(cx: @CrateContext, e: &ast::Expr) -> (ValueRef, bool) {
|
||||||
let tsize = machine::llsize_of_alloc(cx, llty);
|
let tsize = machine::llsize_of_alloc(cx, llty);
|
||||||
if csize != tsize {
|
if csize != tsize {
|
||||||
unsafe {
|
unsafe {
|
||||||
// XXX these values could use some context
|
// FIXME these values could use some context
|
||||||
llvm::LLVMDumpValue(llconst);
|
llvm::LLVMDumpValue(llconst);
|
||||||
llvm::LLVMDumpValue(C_undef(llty));
|
llvm::LLVMDumpValue(C_undef(llty));
|
||||||
}
|
}
|
||||||
|
|
|
@ -417,7 +417,7 @@ pub fn trans_intrinsic(ccx: @CrateContext,
|
||||||
RetVoid(bcx);
|
RetVoid(bcx);
|
||||||
}
|
}
|
||||||
"morestack_addr" => {
|
"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
|
// native function. There should be a general in-language
|
||||||
// way to do this
|
// way to do this
|
||||||
let llfty = type_of_rust_fn(bcx.ccx(), None, [], ty::mk_nil());
|
let llfty = type_of_rust_fn(bcx.ccx(), None, [], ty::mk_nil());
|
||||||
|
|
|
@ -95,7 +95,7 @@ pub fn trans_impl(ccx: @CrateContext,
|
||||||
/// * `llfn`: a closure returning the LLVM ValueRef for the method
|
/// * `llfn`: a closure returning the LLVM ValueRef for the method
|
||||||
/// * `impl_id`: the node ID of the impl this method is inside
|
/// * `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,
|
pub fn trans_method(ccx: @CrateContext,
|
||||||
path: Path,
|
path: Path,
|
||||||
method: &ast::Method,
|
method: &ast::Method,
|
||||||
|
|
|
@ -2494,7 +2494,7 @@ pub fn type_is_pod(cx: ctxt, ty: t) -> bool {
|
||||||
ty_enum(did, ref substs) => {
|
ty_enum(did, ref substs) => {
|
||||||
let variants = enum_variants(cx, did);
|
let variants = enum_variants(cx, did);
|
||||||
for variant in (*variants).iter() {
|
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!
|
// synthesize a tuple!
|
||||||
//
|
//
|
||||||
// Perform any type parameter substitutions.
|
// 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] {
|
pub fn node_id_to_type_params(cx: ctxt, id: ast::NodeId) -> ~[t] {
|
||||||
let node_type_substs = cx.node_type_substs.borrow();
|
let node_type_substs = cx.node_type_substs.borrow();
|
||||||
match node_type_substs.get().find(&id) {
|
match node_type_substs.get().find(&id) {
|
||||||
|
|
|
@ -861,7 +861,7 @@ impl<'a> LookupContext<'a> {
|
||||||
rcvr_ty: ty::t,
|
rcvr_ty: ty::t,
|
||||||
candidates: &mut ~[Candidate])
|
candidates: &mut ~[Candidate])
|
||||||
-> Option<method_map_entry> {
|
-> Option<method_map_entry> {
|
||||||
// XXX(pcwalton): Do we need to clone here?
|
// FIXME(pcwalton): Do we need to clone here?
|
||||||
let relevant_candidates: ~[Candidate] =
|
let relevant_candidates: ~[Candidate] =
|
||||||
candidates.iter().map(|c| (*c).clone()).
|
candidates.iter().map(|c| (*c).clone()).
|
||||||
filter(|c| self.is_relevant(rcvr_ty, c)).collect();
|
filter(|c| self.is_relevant(rcvr_ty, c)).collect();
|
||||||
|
@ -1169,7 +1169,7 @@ impl<'a> LookupContext<'a> {
|
||||||
let destructors = self.tcx().destructors.borrow();
|
let destructors = self.tcx().destructors.borrow();
|
||||||
bad = destructors.get().contains(&method_id);
|
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
|
// that self has been merged in? -sully
|
||||||
method_param(method_param { trait_id: trait_id, .. }) |
|
method_param(method_param { trait_id: trait_id, .. }) |
|
||||||
method_object(method_object { trait_id: trait_id, .. }) => {
|
method_object(method_object { trait_id: trait_id, .. }) => {
|
||||||
|
|
|
@ -2691,7 +2691,7 @@ pub fn check_expr_with_unifier(fcx: @FnCtxt,
|
||||||
let mut checked = false;
|
let mut checked = false;
|
||||||
match place.node {
|
match place.node {
|
||||||
ast::ExprPath(ref path) => {
|
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.
|
// places: the exchange heap and the managed heap.
|
||||||
let definition = lookup_def(fcx, path.span, place.id);
|
let definition = lookup_def(fcx, path.span, place.id);
|
||||||
let def_id = ast_util::def_id_of_def(definition);
|
let def_id = ast_util::def_id_of_def(definition);
|
||||||
|
|
|
@ -330,7 +330,7 @@ fn search_for_vtable(vcx: &VtableContext,
|
||||||
ty::populate_implementations_for_trait_if_necessary(tcx,
|
ty::populate_implementations_for_trait_if_necessary(tcx,
|
||||||
trait_ref.def_id);
|
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.
|
// pointless allocations.
|
||||||
let impls = {
|
let impls = {
|
||||||
let trait_impls = tcx.trait_impls.borrow();
|
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
|
// we're trying to cast to some_trait. If not, then we try
|
||||||
// the next impl.
|
// 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
|
// FIXME(#5781) this should be mk_eqty not mk_subty
|
||||||
let ty::ty_param_substs_and_ty {
|
let ty::ty_param_substs_and_ty {
|
||||||
|
|
|
@ -309,7 +309,7 @@ impl CoherenceChecker {
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
}
|
}
|
||||||
Some(base_type_def_id) => {
|
Some(base_type_def_id) => {
|
||||||
// XXX: Gather up default methods?
|
// FIXME: Gather up default methods?
|
||||||
if associated_traits.len() == 0 {
|
if associated_traits.len() == 0 {
|
||||||
self.add_inherent_impl(base_type_def_id, implementation);
|
self.add_inherent_impl(base_type_def_id, implementation);
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,7 +323,7 @@ impl fmt::Default for clean::Type {
|
||||||
},
|
},
|
||||||
arrow = match decl.decl.output { clean::Unit => "no", _ => "yes" },
|
arrow = match decl.decl.output { clean::Unit => "no", _ => "yes" },
|
||||||
ret = decl.decl.output);
|
ret = decl.decl.output);
|
||||||
// XXX: where are bounds and lifetimes printed?!
|
// FIXME: where are bounds and lifetimes printed?!
|
||||||
}
|
}
|
||||||
clean::BareFunction(ref decl) => {
|
clean::BareFunction(ref decl) => {
|
||||||
write!(f.buf, "{}{}fn{}{}",
|
write!(f.buf, "{}{}fn{}{}",
|
||||||
|
@ -481,7 +481,7 @@ impl fmt::Default for clean::ViewPath {
|
||||||
impl fmt::Default for clean::ImportSource {
|
impl fmt::Default for clean::ImportSource {
|
||||||
fn fmt(v: &clean::ImportSource, f: &mut fmt::Formatter) {
|
fn fmt(v: &clean::ImportSource, f: &mut fmt::Formatter) {
|
||||||
match v.did {
|
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) => {
|
Some(did) if ast_util::is_local(did) => {
|
||||||
resolved_path(f.buf, did.node, &v.path, true);
|
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 {
|
impl fmt::Default for clean::ViewListIdent {
|
||||||
fn fmt(v: &clean::ViewListIdent, f: &mut fmt::Formatter) {
|
fn fmt(v: &clean::ViewListIdent, f: &mut fmt::Formatter) {
|
||||||
match v.source {
|
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) => {
|
Some(did) if ast_util::is_local(did) => {
|
||||||
let path = clean::Path {
|
let path = clean::Path {
|
||||||
global: false,
|
global: false,
|
||||||
|
|
|
@ -301,7 +301,7 @@ fn json_input(input: &str) -> Result<Output, ~str> {
|
||||||
}
|
}
|
||||||
None => return Err(~"malformed json"),
|
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...
|
// Json doesn't implement decodable...
|
||||||
let plugin_output = ~[];
|
let plugin_output = ~[];
|
||||||
Ok((crate, plugin_output))
|
Ok((crate, plugin_output))
|
||||||
|
|
|
@ -459,7 +459,7 @@ impl PkgSrc {
|
||||||
subcfgs,
|
subcfgs,
|
||||||
opt,
|
opt,
|
||||||
what);
|
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
|
// 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.
|
// output as "Some(\"path\")". But I don't know what to do about it.
|
||||||
// FIXME (#9639): This needs to handle non-utf8 paths
|
// FIXME (#9639): This needs to handle non-utf8 paths
|
||||||
|
|
|
@ -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,
|
/// with dtors may not be destructured, but tuple structs can,
|
||||||
/// but the results are not correct.
|
/// but the results are not correct.
|
||||||
pub struct Loop {
|
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
|
// compared to the UvError type
|
||||||
|
|
||||||
pub struct UvError(c_int);
|
pub struct UvError(c_int);
|
||||||
|
@ -349,7 +349,7 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError {
|
||||||
uvll::EADDRNOTAVAIL => io::ConnectionRefused,
|
uvll::EADDRNOTAVAIL => io::ConnectionRefused,
|
||||||
err => {
|
err => {
|
||||||
uvdebug!("uverr.code {}", err as int);
|
uvdebug!("uverr.code {}", err as int);
|
||||||
// XXX: Need to map remaining uv error types
|
// FIXME: Need to map remaining uv error types
|
||||||
io::OtherIoError
|
io::OtherIoError
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -343,7 +343,7 @@ impl rtio::RtioTcpListener for TcpListener {
|
||||||
let mut acceptor = ~TcpAcceptor { listener: self };
|
let mut acceptor = ~TcpAcceptor { listener: self };
|
||||||
|
|
||||||
let _m = acceptor.fire_homing_missile();
|
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) } {
|
match unsafe { uvll::uv_listen(acceptor.listener.handle, 128, listen_cb) } {
|
||||||
0 => Ok(acceptor as ~rtio::RtioTcpAcceptor),
|
0 => Ok(acceptor as ~rtio::RtioTcpAcceptor),
|
||||||
n => Err(uv_error_to_io_error(UvError(n))),
|
n => Err(uv_error_to_io_error(UvError(n))),
|
||||||
|
|
|
@ -179,7 +179,7 @@ impl RtioUnixListener for PipeListener {
|
||||||
let mut acceptor = ~PipeAcceptor { listener: self };
|
let mut acceptor = ~PipeAcceptor { listener: self };
|
||||||
|
|
||||||
let _m = acceptor.fire_homing_missile();
|
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) } {
|
match unsafe { uvll::uv_listen(acceptor.listener.pipe, 128, listen_cb) } {
|
||||||
0 => Ok(acceptor as ~RtioUnixAcceptor),
|
0 => Ok(acceptor as ~RtioUnixAcceptor),
|
||||||
n => Err(uv_error_to_io_error(UvError(n))),
|
n => Err(uv_error_to_io_error(UvError(n))),
|
||||||
|
|
|
@ -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
|
// Stop reading so that no read callbacks are
|
||||||
// triggered before the user calls `read` again.
|
// 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?
|
// stop here?
|
||||||
unsafe { assert_eq!(uvll::uv_read_stop(handle), 0); }
|
unsafe { assert_eq!(uvll::uv_read_stop(handle), 0); }
|
||||||
rcx.result = nread;
|
rcx.result = nread;
|
||||||
|
|
|
@ -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 {
|
pub unsafe fn loop_new() -> *c_void {
|
||||||
return rust_uv_loop_new();
|
return rust_uv_loop_new();
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ unsafe fn each_live_alloc(read_next_before: bool,
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
fn debug_mem() -> bool {
|
fn debug_mem() -> bool {
|
||||||
// XXX: Need to port the environment struct to newsched
|
// FIXME: Need to port the environment struct to newsched
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -780,7 +780,7 @@ impl<'a> Formatter<'a> {
|
||||||
rt::Keyword(parse::One) => value == 1,
|
rt::Keyword(parse::One) => value == 1,
|
||||||
rt::Keyword(parse::Two) => value == 2,
|
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
|
// One possible option would be in the function
|
||||||
// pointer of the 'arg: Argument' struct.
|
// pointer of the 'arg: Argument' struct.
|
||||||
rt::Keyword(parse::Few) => value < 8,
|
rt::Keyword(parse::Few) => value < 8,
|
||||||
|
@ -1085,7 +1085,7 @@ integer!(i64, u64)
|
||||||
macro_rules! floating(($ty:ident) => {
|
macro_rules! floating(($ty:ident) => {
|
||||||
impl Float for $ty {
|
impl Float for $ty {
|
||||||
fn fmt(f: &$ty, fmt: &mut Formatter) {
|
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 {
|
let s = match fmt.precision {
|
||||||
Some(i) => ::$ty::to_str_exact(f.abs(), i),
|
Some(i) => ::$ty::to_str_exact(f.abs(), i),
|
||||||
None => ::$ty::to_str_digits(f.abs(), 6)
|
None => ::$ty::to_str_digits(f.abs(), 6)
|
||||||
|
@ -1096,7 +1096,7 @@ macro_rules! floating(($ty:ident) => {
|
||||||
|
|
||||||
impl LowerExp for $ty {
|
impl LowerExp for $ty {
|
||||||
fn fmt(f: &$ty, fmt: &mut Formatter) {
|
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 {
|
let s = match fmt.precision {
|
||||||
Some(i) => ::$ty::to_str_exp_exact(f.abs(), i, false),
|
Some(i) => ::$ty::to_str_exp_exact(f.abs(), i, false),
|
||||||
None => ::$ty::to_str_exp_digits(f.abs(), 6, false)
|
None => ::$ty::to_str_exp_digits(f.abs(), 6, false)
|
||||||
|
@ -1107,7 +1107,7 @@ macro_rules! floating(($ty:ident) => {
|
||||||
|
|
||||||
impl UpperExp for $ty {
|
impl UpperExp for $ty {
|
||||||
fn fmt(f: &$ty, fmt: &mut Formatter) {
|
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 {
|
let s = match fmt.precision {
|
||||||
Some(i) => ::$ty::to_str_exp_exact(f.abs(), i, true),
|
Some(i) => ::$ty::to_str_exp_exact(f.abs(), i, true),
|
||||||
None => ::$ty::to_str_exp_digits(f.abs(), 6, true)
|
None => ::$ty::to_str_exp_digits(f.abs(), 6, true)
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
//! Utility mixins that apply to all Readers and Writers
|
//! Utility mixins that apply to all Readers and Writers
|
||||||
|
|
||||||
// XXX: Not sure how this should be structured
|
// FIXME: Not sure how this should be structured
|
||||||
// XXX: Iteration should probably be considered separately
|
// FIXME: Iteration should probably be considered separately
|
||||||
|
|
||||||
use container::Container;
|
use container::Container;
|
||||||
use iter::Iterator;
|
use iter::Iterator;
|
||||||
|
|
|
@ -84,7 +84,7 @@ Some examples of obvious things you might want to do
|
||||||
```
|
```
|
||||||
|
|
||||||
* Make an simple HTTP request
|
* 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.
|
`write_str` and `write_line` methods.
|
||||||
|
|
||||||
```rust,should_fail
|
```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
|
* Connect based on URL? Requires thinking about where the URL type lives
|
||||||
and how to make protocol handlers extensible, e.g. the "tcp" protocol
|
and how to make protocol handlers extensible, e.g. the "tcp" protocol
|
||||||
yields a `TcpStream`.
|
yields a `TcpStream`.
|
||||||
XXX this is not implemented now.
|
FIXME this is not implemented now.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
// connect("tcp://localhost:8080");
|
// connect("tcp://localhost:8080");
|
||||||
|
@ -209,7 +209,7 @@ if error.is_some() {
|
||||||
# ::std::io::fs::unlink(&Path::new("diary.txt"));
|
# ::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
|
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
|
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
|
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.
|
will start passing around null or zero objects when wrapped in a condition handler.
|
||||||
|
|
||||||
* XXX: How should we use condition handlers that return values?
|
* FIXME: How should we use condition handlers that return values?
|
||||||
* XXX: Should EOF raise default conditions when EOF is not an error?
|
* FIXME: Should EOF raise default conditions when EOF is not an error?
|
||||||
|
|
||||||
# Issues with i/o scheduler affinity, work stealing, task pinning
|
# 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
|
* 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.
|
* Should default constructors take `Path` or `&str`? `Path` makes simple cases verbose.
|
||||||
Overloading would be nice.
|
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
|
/// The type passed to I/O condition handlers to indicate error
|
||||||
///
|
///
|
||||||
/// # XXX
|
/// # FIXME
|
||||||
///
|
///
|
||||||
/// Is something like this sufficient? It's kind of archaic
|
/// Is something like this sufficient? It's kind of archaic
|
||||||
pub struct IoError {
|
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.
|
// Raised by `I/O` operations on error.
|
||||||
condition! {
|
condition! {
|
||||||
pub io_error: IoError -> ();
|
pub io_error: IoError -> ();
|
||||||
|
@ -491,9 +491,9 @@ pub trait Reader {
|
||||||
/// Raises the `io_error` condition on error. If the condition
|
/// Raises the `io_error` condition on error. If the condition
|
||||||
/// is handled then no guarantee is made about the number of bytes
|
/// is handled then no guarantee is made about the number of bytes
|
||||||
/// read and the contents of `buf`. If the condition is handled
|
/// 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?
|
/// * Should raise_default error on eof?
|
||||||
/// * If the condition is handled it should still return the bytes read,
|
/// * If the condition is handled it should still return the bytes read,
|
||||||
|
@ -1218,7 +1218,7 @@ pub enum SeekStyle {
|
||||||
SeekCur,
|
SeekCur,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # XXX
|
/// # FIXME
|
||||||
/// * Are `u64` and `i64` the right choices?
|
/// * Are `u64` and `i64` the right choices?
|
||||||
pub trait Seek {
|
pub trait Seek {
|
||||||
/// Return position of file cursor in the stream
|
/// Return position of file cursor in the stream
|
||||||
|
@ -1228,7 +1228,7 @@ pub trait Seek {
|
||||||
///
|
///
|
||||||
/// A successful seek clears the EOF indicator.
|
/// A successful seek clears the EOF indicator.
|
||||||
///
|
///
|
||||||
/// # XXX
|
/// # FIXME
|
||||||
///
|
///
|
||||||
/// * What is the behavior when seeking past the end of a stream?
|
/// * What is the behavior when seeking past the end of a stream?
|
||||||
fn seek(&mut self, pos: i64, style: SeekStyle);
|
fn seek(&mut self, pos: i64, style: SeekStyle);
|
||||||
|
|
|
@ -91,7 +91,7 @@ pub fn get_host_addresses(host: &str) -> Option<~[IpAddr]> {
|
||||||
///
|
///
|
||||||
/// On failure, this will raise on the `io_error` condition.
|
/// 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.
|
/// consumption just yet.
|
||||||
fn lookup(hostname: Option<&str>, servname: Option<&str>, hint: Option<Hint>)
|
fn lookup(hostname: Option<&str>, servname: Option<&str>, hint: Option<Hint>)
|
||||||
-> Option<~[Info]> {
|
-> Option<~[Info]> {
|
||||||
|
|
|
@ -584,7 +584,7 @@ mod test {
|
||||||
})
|
})
|
||||||
|
|
||||||
iotest!(fn socket_and_peer_name_ip6() {
|
iotest!(fn socket_and_peer_name_ip6() {
|
||||||
// XXX: peer name is not consistent
|
// FIXME: peer name is not consistent
|
||||||
//peer_name(next_test_ip6());
|
//peer_name(next_test_ip6());
|
||||||
socket_name(next_test_ip6());
|
socket_name(next_test_ip6());
|
||||||
})
|
})
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub trait Sample<Support> {
|
||||||
/// Since no state is recorded, each sample is (statistically)
|
/// Since no state is recorded, each sample is (statistically)
|
||||||
/// independent of all others, assuming the `Rng` used has this
|
/// independent of all others, assuming the `Rng` used has this
|
||||||
/// property.
|
/// 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
|
// take &self rather than &mut self)? or maybe this should be the
|
||||||
// trait called `Sample` and the other should be `DependentSample`.
|
// trait called `Sample` and the other should be `DependentSample`.
|
||||||
pub trait IndependentSample<Support>: Sample<Support> {
|
pub trait IndependentSample<Support>: Sample<Support> {
|
||||||
|
|
|
@ -108,7 +108,7 @@ fn do_iter_crate_map<'a>(
|
||||||
|
|
||||||
/// Iterates recursively over `crate_map` and all child crate maps
|
/// Iterates recursively over `crate_map` and all child crate maps
|
||||||
pub fn iter_crate_map<'a>(crate_map: &'a CrateMap<'a>, f: |&ModEntry|) {
|
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
|
// way to do this
|
||||||
let mut v: HashSet<*CrateMap<'a>> = HashSet::with_capacity_and_keys(0, 0, 32);
|
let mut v: HashSet<*CrateMap<'a>> = HashSet::with_capacity_and_keys(0, 0, 32);
|
||||||
do_iter_crate_map(crate_map, f, &mut v);
|
do_iter_crate_map(crate_map, f, &mut v);
|
||||||
|
|
|
@ -293,7 +293,7 @@ impl Drop for MemoryRegion {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn local_malloc(td: *u8, size: uint) -> *u8 {
|
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();
|
let task: Option<*mut Task> = Local::try_unsafe_borrow();
|
||||||
match task {
|
match task {
|
||||||
Some(task) => {
|
Some(task) => {
|
||||||
|
@ -306,7 +306,7 @@ pub unsafe fn local_malloc(td: *u8, size: uint) -> *u8 {
|
||||||
// A little compatibility function
|
// A little compatibility function
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn local_free(ptr: *u8) {
|
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();
|
let task_ptr: Option<*mut Task> = Local::try_unsafe_borrow();
|
||||||
match task_ptr {
|
match task_ptr {
|
||||||
Some(task) => {
|
Some(task) => {
|
||||||
|
|
|
@ -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)];
|
#[allow(missing_doc)];
|
||||||
|
|
||||||
use any::Any;
|
use any::Any;
|
||||||
|
@ -71,7 +71,7 @@ pub use self::util::default_sched_threads;
|
||||||
// Export unwinding facilities used by the failure macros
|
// Export unwinding facilities used by the failure macros
|
||||||
pub use self::unwind::{begin_unwind, begin_unwind_raw};
|
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)]
|
#[doc(hidden)]
|
||||||
pub mod shouldnt_be_public {
|
pub mod shouldnt_be_public {
|
||||||
pub use super::local_ptr::native::maybe_tls_key;
|
pub use super::local_ptr::native::maybe_tls_key;
|
||||||
|
@ -155,7 +155,7 @@ pub trait Runtime {
|
||||||
/// The (low, high) edges of the current stack.
|
/// The (low, high) edges of the current stack.
|
||||||
fn stack_bounds(&self) -> (uint, uint); // (lo, hi)
|
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;
|
fn wrap(~self) -> ~Any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ pub trait Runtime {
|
||||||
/// the crate's logging flags, registering GC
|
/// the crate's logging flags, registering GC
|
||||||
/// metadata, and storing the process arguments.
|
/// metadata, and storing the process arguments.
|
||||||
pub fn init(argc: int, argv: **u8) {
|
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`.
|
// Need to propagate the unsafety to `start`.
|
||||||
unsafe {
|
unsafe {
|
||||||
args::init(argc, argv);
|
args::init(argc, argv);
|
||||||
|
|
|
@ -86,7 +86,7 @@ pub struct LocalIo<'a> {
|
||||||
#[unsafe_destructor]
|
#[unsafe_destructor]
|
||||||
impl<'a> Drop for LocalIo<'a> {
|
impl<'a> Drop for LocalIo<'a> {
|
||||||
fn drop(&mut self) {
|
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.
|
// 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.
|
/// Returns the underlying I/O factory as a trait reference.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn get<'a>(&'a mut self) -> &'a mut IoFactory {
|
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?
|
// allow this safely?
|
||||||
unsafe {
|
unsafe {
|
||||||
cast::transmute_copy(&self.factory)
|
cast::transmute_copy(&self.factory)
|
||||||
|
|
|
@ -212,7 +212,7 @@ impl Task {
|
||||||
// pretty sketchy and involves shuffling vtables of trait objects
|
// pretty sketchy and involves shuffling vtables of trait objects
|
||||||
// around, but it gets the job done.
|
// 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
|
// 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
|
// function, and I would be saddened if more usage of the function
|
||||||
// crops up.
|
// crops up.
|
||||||
|
|
|
@ -20,7 +20,7 @@ use unstable::running_on_valgrind;
|
||||||
use vec::ImmutableVector;
|
use vec::ImmutableVector;
|
||||||
|
|
||||||
// Indicates whether we should perform expensive sanity checks, including rtassert!
|
// 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);
|
pub static ENFORCE_SANITY: bool = true || !cfg!(rtopt) || cfg!(rtdebug) || cfg!(rtassert);
|
||||||
|
|
||||||
/// Get the number of cores available
|
/// Get the number of cores available
|
||||||
|
|
|
@ -119,7 +119,7 @@ impl Str for SendStr {
|
||||||
fn as_slice<'r>(&'r self) -> &'r str {
|
fn as_slice<'r>(&'r self) -> &'r str {
|
||||||
match *self {
|
match *self {
|
||||||
SendStrOwned(ref s) => s.as_slice(),
|
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) => s.as_slice()
|
||||||
SendStrStatic(s) => {let tmp: &'static str = s; tmp}
|
SendStrStatic(s) => {let tmp: &'static str = s; tmp}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
// NB: the "buffer pool" strategy is not done for speed, but rather for
|
// NB: the "buffer pool" strategy is not done for speed, but rather for
|
||||||
// correctness. For more info, see the comment on `swap_buffer`
|
// 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
|
// probably overkill
|
||||||
|
|
||||||
use cast;
|
use cast;
|
||||||
|
|
|
@ -43,7 +43,7 @@ use sync::atomics::{AtomicPtr, Relaxed, AtomicUint, Acquire, Release};
|
||||||
|
|
||||||
// Node within the linked list queue of messages to send
|
// Node within the linked list queue of messages to send
|
||||||
struct Node<T> {
|
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).
|
// that would reduce memory usage (and be a bit faster).
|
||||||
// is it worth it?
|
// is it worth it?
|
||||||
value: Option<T>, // nullable for re-use of nodes
|
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 {
|
if self.cache_bound == 0 {
|
||||||
self.tail_prev.store(tail, Release);
|
self.tail_prev.store(tail, Release);
|
||||||
} else {
|
} else {
|
||||||
// XXX: this is dubious with overflow.
|
// FIXME: this is dubious with overflow.
|
||||||
let additions = self.cache_additions.load(Relaxed);
|
let additions = self.cache_additions.load(Relaxed);
|
||||||
let subtractions = self.cache_subtractions.load(Relaxed);
|
let subtractions = self.cache_subtractions.load(Relaxed);
|
||||||
let size = additions - subtractions;
|
let size = additions - subtractions;
|
||||||
|
|
|
@ -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
|
/// from, even if it's hard to read (previously they would all just be
|
||||||
/// listed as `__extensions__::method_name::hash`, with no indication
|
/// listed as `__extensions__::method_name::hash`, with no indication
|
||||||
/// of the type).
|
/// 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
|
// relic of $ being one of the very few valid symbol names on
|
||||||
// unix. These kinds of details shouldn't be exposed way up here
|
// unix. These kinds of details shouldn't be exposed way up here
|
||||||
// in the ast.
|
// in the ast.
|
||||||
|
|
|
@ -41,7 +41,7 @@ pub struct BytePos(u32);
|
||||||
#[deriving(Eq,IterBytes, Ord)]
|
#[deriving(Eq,IterBytes, Ord)]
|
||||||
pub struct CharPos(uint);
|
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
|
// have been unsuccessful
|
||||||
|
|
||||||
impl Pos for BytePos {
|
impl Pos for BytePos {
|
||||||
|
|
|
@ -179,7 +179,7 @@ pub trait AstBuilder {
|
||||||
name: Ident, attrs: ~[ast::Attribute], node: ast::Item_) -> @ast::Item;
|
name: Ident, attrs: ~[ast::Attribute], node: ast::Item_) -> @ast::Item;
|
||||||
|
|
||||||
fn arg(&self, span: Span, name: Ident, ty: P<ast::Ty>) -> ast::Arg;
|
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 fn_decl(&self, inputs: ~[ast::Arg], output: P<ast::Ty>) -> P<ast::FnDecl>;
|
||||||
|
|
||||||
fn item_fn_poly(&self,
|
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> {
|
fn fn_decl(&self, inputs: ~[ast::Arg], output: P<ast::Ty>) -> P<ast::FnDecl> {
|
||||||
P(ast::FnDecl {
|
P(ast::FnDecl {
|
||||||
inputs: inputs,
|
inputs: inputs,
|
||||||
|
@ -736,7 +736,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
|
||||||
|
|
||||||
fn item(&self, span: Span,
|
fn item(&self, span: Span,
|
||||||
name: Ident, attrs: ~[ast::Attribute], node: ast::Item_) -> @ast::Item {
|
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
|
// Rust coding conventions
|
||||||
@ast::Item { ident: name,
|
@ast::Item { ident: name,
|
||||||
attrs: attrs,
|
attrs: attrs,
|
||||||
|
|
|
@ -115,7 +115,7 @@ pub fn expand_expr(e: @ast::Expr, fld: &mut MacroExpander) -> @ast::Expr {
|
||||||
|
|
||||||
// Keep going, outside-in.
|
// Keep going, outside-in.
|
||||||
//
|
//
|
||||||
// XXX(pcwalton): Is it necessary to clone the
|
// FIXME(pcwalton): Is it necessary to clone the
|
||||||
// node here?
|
// node here?
|
||||||
let fully_expanded =
|
let fully_expanded =
|
||||||
fld.fold_expr(marked_after).node.clone();
|
fld.fold_expr(marked_after).node.clone();
|
||||||
|
|
|
@ -173,7 +173,7 @@ fn lockstep_iter_size(t: &TokenTree, r: &TtReader) -> LockstepIterSize {
|
||||||
// return the next token from the TtReader.
|
// return the next token from the TtReader.
|
||||||
// EFFECT: advances the reader's token field
|
// EFFECT: advances the reader's token field
|
||||||
pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
|
pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
|
||||||
// XXX(pcwalton): Bad copy?
|
// FIXME(pcwalton): Bad copy?
|
||||||
let ret_val = TokenAndSpan {
|
let ret_val = TokenAndSpan {
|
||||||
tok: r.cur_tok.get(),
|
tok: r.cur_tok.get(),
|
||||||
sp: r.cur_span.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
|
loop { /* because it's easiest, this handles `TTDelim` not starting
|
||||||
with a `TTTok`, even though it won't happen */
|
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() {
|
match r.stack.get().forest[r.stack.get().idx.get()].clone() {
|
||||||
TTDelim(tts) => {
|
TTDelim(tts) => {
|
||||||
r.stack.set(@TtFrame {
|
r.stack.set(@TtFrame {
|
||||||
|
@ -250,7 +250,7 @@ pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
TTSeq(sp, tts, sep, zerok) => {
|
TTSeq(sp, tts, sep, zerok) => {
|
||||||
// XXX(pcwalton): Bad copy.
|
// FIXME(pcwalton): Bad copy.
|
||||||
let t = TTSeq(sp, tts, sep.clone(), zerok);
|
let t = TTSeq(sp, tts, sep.clone(), zerok);
|
||||||
match lockstep_iter_size(&t, r) {
|
match lockstep_iter_size(&t, r) {
|
||||||
LisUnconstrained => {
|
LisUnconstrained => {
|
||||||
|
@ -306,7 +306,7 @@ pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
MatchedNonterminal(ref other_whole_nt) => {
|
MatchedNonterminal(ref other_whole_nt) => {
|
||||||
// XXX(pcwalton): Bad copy.
|
// FIXME(pcwalton): Bad copy.
|
||||||
r.cur_span.set(sp);
|
r.cur_span.set(sp);
|
||||||
r.cur_tok.set(INTERPOLATED((*other_whole_nt).clone()));
|
r.cur_tok.set(INTERPOLATED((*other_whole_nt).clone()));
|
||||||
r.stack.get().idx.set(r.stack.get().idx.get() + 1u);
|
r.stack.get().idx.set(r.stack.get().idx.get() + 1u);
|
||||||
|
|
|
@ -123,7 +123,7 @@ impl Reader for StringReader {
|
||||||
}
|
}
|
||||||
fn span_diag(@self) -> @SpanHandler { self.span_diagnostic }
|
fn span_diag(@self) -> @SpanHandler { self.span_diagnostic }
|
||||||
fn peek(@self) -> TokenAndSpan {
|
fn peek(@self) -> TokenAndSpan {
|
||||||
// XXX(pcwalton): Bad copy!
|
// FIXME(pcwalton): Bad copy!
|
||||||
TokenAndSpan {
|
TokenAndSpan {
|
||||||
tok: self.peek_tok.get(),
|
tok: self.peek_tok.get(),
|
||||||
sp: self.peek_span.get(),
|
sp: self.peek_span.get(),
|
||||||
|
|
|
@ -1237,7 +1237,7 @@ impl Parser {
|
||||||
Parser::token_is_lifetime(&self.token) {
|
Parser::token_is_lifetime(&self.token) {
|
||||||
// CLOSURE
|
// 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
|
// introduce a closure, once procs can have lifetime bounds. We
|
||||||
// will need to refactor the grammar a little bit at that point.
|
// will need to refactor the grammar a little bit at that point.
|
||||||
|
|
||||||
|
@ -3949,7 +3949,7 @@ impl Parser {
|
||||||
let generics = self.parse_generics();
|
let generics = self.parse_generics();
|
||||||
|
|
||||||
// This is a new-style impl declaration.
|
// This is a new-style impl declaration.
|
||||||
// XXX: clownshoes
|
// FIXME: clownshoes
|
||||||
let ident = special_idents::clownshoes_extensions;
|
let ident = special_idents::clownshoes_extensions;
|
||||||
|
|
||||||
// Special case: if the next identifier that follows is '(', don't
|
// Special case: if the next identifier that follows is '(', don't
|
||||||
|
@ -4071,7 +4071,7 @@ impl Parser {
|
||||||
token_str))
|
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;
|
let new_id = ast::DUMMY_NODE_ID;
|
||||||
(class_name,
|
(class_name,
|
||||||
ItemStruct(@ast::StructDef {
|
ItemStruct(@ast::StructDef {
|
||||||
|
|
|
@ -2311,7 +2311,7 @@ pub fn print_string(s: &mut State, st: &str, style: ast::StrStyle) {
|
||||||
word(&mut s.s, st);
|
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
|
// that we "know" to be a `MemWriter` that works around the lack of checked
|
||||||
// downcasts.
|
// downcasts.
|
||||||
unsafe fn get_mem_writer(writer: &mut ~io::Writer) -> ~str {
|
unsafe fn get_mem_writer(writer: &mut ~io::Writer) -> ~str {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
void*
|
void*
|
||||||
rust_uv_loop_new() {
|
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__
|
#ifndef __WIN32__
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -56,7 +56,7 @@ static HOMO_SAPIENS: [AminoAcid, ..4] = [
|
||||||
AminoAcid { c: 't' as u8, p: 0.3015094502008 },
|
AminoAcid { c: 't' as u8, p: 0.3015094502008 },
|
||||||
];
|
];
|
||||||
|
|
||||||
// XXX: Use map().
|
// FIXME: Use map().
|
||||||
fn sum_and_scale(a: &'static [AminoAcid]) -> ~[AminoAcid] {
|
fn sum_and_scale(a: &'static [AminoAcid]) -> ~[AminoAcid] {
|
||||||
let mut result = ~[];
|
let mut result = ~[];
|
||||||
let mut p = 0f32;
|
let mut p = 0f32;
|
||||||
|
|
|
@ -49,7 +49,7 @@ impl Code {
|
||||||
code
|
code
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: Inefficient.
|
// FIXME: Inefficient.
|
||||||
fn unpack(&self, frame: i32) -> ~str {
|
fn unpack(&self, frame: i32) -> ~str {
|
||||||
let mut key = **self;
|
let mut key = **self;
|
||||||
let mut result = ~[];
|
let mut result = ~[];
|
||||||
|
|
|
@ -22,7 +22,7 @@ mod cross_crate {
|
||||||
use self::lint_stability::*;
|
use self::lint_stability::*;
|
||||||
|
|
||||||
fn test() {
|
fn test() {
|
||||||
// XXX: attributes on methods are not encoded cross crate.
|
// FIXME: attributes on methods are not encoded cross crate.
|
||||||
let foo = MethodTester;
|
let foo = MethodTester;
|
||||||
|
|
||||||
deprecated(); //~ ERROR use of deprecated item
|
deprecated(); //~ ERROR use of deprecated item
|
||||||
|
|
|
@ -37,7 +37,7 @@ pub fn main() {
|
||||||
(@"test").test_imm();
|
(@"test").test_imm();
|
||||||
(&"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
|
// 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
|
// allow creating a mutable pointer to a temporary, which would be a source
|
||||||
|
|
Loading…
Add table
Reference in a new issue