Skip to content

Commit

Permalink
Improve searching for XXX in tidy script (rust-lang#3303)
Browse files Browse the repository at this point in the history
Few places where previous version of tidy script cannot find XXX:
* inside one-line comment preceding by a few spaces;
* inside multiline comments (now it finds it if multiline comment starts
on the same line with XXX).

Change occurences of XXX found by new tidy script.
  • Loading branch information
JIghtuse authored and alexcrichton committed Apr 8, 2014
1 parent de2567d commit 00cbda2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/etc/tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ def do_license_check(name, contents):
check_tab = False
if line.find(linelength_flag) != -1:
check_linelength = False
if line.find("// XXX") != -1:
report_err("XXX is no longer necessary, use FIXME")
if line.find("TODO") != -1:
report_err("TODO is deprecated; use FIXME")
match = re.match(r'^.*/(\*|/!?)\s*XXX', line)
if match:
report_err("XXX is no longer necessary, use FIXME")
match = re.match(r'^.*//\s*(NOTE.*)$', line)
if match:
m = match.group(1)
Expand Down
4 changes: 2 additions & 2 deletions src/librustuv/addrinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl Drop for Addrinfo {
}

fn each_ai_flag(_f: |c_int, ai::Flag|) {
/* XXX: do we really want to support these?
/* FIXME: do we really want to support these?
unsafe {
f(uvll::rust_AI_ADDRCONFIG(), ai::AddrConfig);
f(uvll::rust_AI_ALL(), ai::All);
Expand Down Expand Up @@ -150,7 +150,7 @@ pub fn accum_addrinfo(addr: &Addrinfo) -> ~[ai::Info] {
}
});

/* XXX: do we really want to support these
/* FIXME: do we really want to support these
let protocol = match (*addr).ai_protocol {
p if p == uvll::rust_IPPROTO_UDP() => Some(ai::UDP),
p if p == uvll::rust_IPPROTO_TCP() => Some(ai::TCP),
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/rt/local_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//!
//! The runtime will use this for storing ~Task.
//!
//! XXX: Add runtime checks for usage of inconsistent pointer types.
//! FIXME: Add runtime checks for usage of inconsistent pointer types.
//! and for overwriting an existing pointer.

#![allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/bench/shootout-threadring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::os;
fn start(n_tasks: int, token: int) {
let (tx, mut rx) = channel();
tx.send(token);
// XXX could not get this to work with a range closure
// FIXME could not get this to work with a range closure
let mut i = 2;
while i <= n_tasks {
let (tx, next_rx) = channel();
Expand Down

0 comments on commit 00cbda2

Please sign in to comment.