diff --git a/src/base64/base64.rs b/src/base64/base64.rs index 06f62e5e5..d2881e0d3 100644 --- a/src/base64/base64.rs +++ b/src/base64/base64.rs @@ -9,13 +9,10 @@ * that was distributed with this source code. */ -#![feature(phase)] -#![feature(macro_rules)] - extern crate serialize; extern crate getopts; extern crate libc; -#[phase(plugin, link)] extern crate log; +#[macro_use] extern crate log; use std::ascii::AsciiExt; use std::io::{println, File, stdout}; @@ -31,6 +28,7 @@ use serialize::base64; use serialize::base64::{FromBase64, ToBase64}; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "base64"; diff --git a/src/basename/basename.rs b/src/basename/basename.rs index d2b44ac0d..0f9f304cb 100644 --- a/src/basename/basename.rs +++ b/src/basename/basename.rs @@ -1,4 +1,3 @@ -#![feature(macro_rules)] #![crate_name = "basename"] /* @@ -17,6 +16,7 @@ use std::borrow::ToOwned; use std::io::{print, println}; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "basename"; diff --git a/src/chmod/chmod.rs b/src/chmod/chmod.rs index 6a9d0ce7b..5c5125c3c 100644 --- a/src/chmod/chmod.rs +++ b/src/chmod/chmod.rs @@ -9,14 +9,12 @@ * file that was distributed with this source code. */ -#![feature(macro_rules, phase)] - #![allow(unused_variables)] // only necessary while the TODOs still exist extern crate getopts; extern crate libc; extern crate regex; -#[phase(plugin)] extern crate regex_macros; +#[macro_use] extern crate regex_macros; use std::io::fs; use std::io::fs::PathExtensions; @@ -26,6 +24,7 @@ use std::num::from_str_radix; use regex::Regex; #[path = "../common/util.rs"] +#[macro_use] mod util; const NAME: &'static str = "chmod"; diff --git a/src/chroot/chroot.rs b/src/chroot/chroot.rs index 5afbbfa99..c718460c6 100644 --- a/src/chroot/chroot.rs +++ b/src/chroot/chroot.rs @@ -8,7 +8,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] extern crate getopts; extern crate libc; @@ -17,7 +16,7 @@ use c_types::{get_pw_from_args, get_group}; use libc::funcs::posix88::unistd::{execvp, setuid, setgid}; use std::io::fs::PathExtensions; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; #[path = "../common/c_types.rs"] mod c_types; extern { diff --git a/src/cksum/cksum.rs b/src/cksum/cksum.rs index 0a3b793e7..48df0ec77 100644 --- a/src/cksum/cksum.rs +++ b/src/cksum/cksum.rs @@ -1,5 +1,4 @@ #![crate_name = "cksum"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. @@ -19,6 +18,7 @@ use std::mem; use crc_table::CRC_TABLE; #[path="../common/util.rs"] +#[macro_use] mod util; mod crc_table; diff --git a/src/common/util.rs b/src/common/util.rs index 5986eca63..2aaf848ba 100644 --- a/src/common/util.rs +++ b/src/common/util.rs @@ -7,11 +7,8 @@ * file that was distributed with this source code. */ -#![macro_escape] - extern crate libc; -#[macro_export] macro_rules! show_error( ($($args:expr),+) => ({ pipe_write!(&mut ::std::io::stderr(), "{}: error: ", ::NAME); diff --git a/src/cp/cp.rs b/src/cp/cp.rs index 4e3826c59..86d41686b 100644 --- a/src/cp/cp.rs +++ b/src/cp/cp.rs @@ -1,6 +1,4 @@ #![crate_name = "cp"] -#![feature(macro_rules)] -#![feature(phase)] /* * This file is part of the uutils coreutils package. @@ -12,7 +10,7 @@ */ extern crate getopts; -#[phase(plugin, link)] extern crate log; +#[macro_use] extern crate log; use std::os; use std::io; diff --git a/src/cut/cut.rs b/src/cut/cut.rs index 4d0b9f0e1..d91a04072 100644 --- a/src/cut/cut.rs +++ b/src/cut/cut.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -21,6 +19,7 @@ use getopts::{optopt, optflag, getopts, usage}; use ranges::Range; #[path = "../common/util.rs"] +#[macro_use] mod util; mod ranges; mod buffer; diff --git a/src/du/du.rs b/src/du/du.rs index c84c4e283..b545d174c 100644 --- a/src/du/du.rs +++ b/src/du/du.rs @@ -10,7 +10,6 @@ */ #![allow(non_snake_case)] -#![feature(macro_rules)] extern crate getopts; extern crate libc; @@ -25,6 +24,7 @@ use std::str::from_utf8; use time::Timespec; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "du"; diff --git a/src/echo/echo.rs b/src/echo/echo.rs index 1cf203f08..dd20766ac 100644 --- a/src/echo/echo.rs +++ b/src/echo/echo.rs @@ -1,4 +1,3 @@ -#![feature(macro_rules)] #![crate_name = "echo"] /* diff --git a/src/expand/expand.rs b/src/expand/expand.rs index bcaa121fb..b0b922d39 100644 --- a/src/expand/expand.rs +++ b/src/expand/expand.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -18,6 +16,7 @@ use std::io; use std::str::from_str; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "expand"; diff --git a/src/factor/factor.rs b/src/factor/factor.rs index 5cb9b85fb..5a3c31de0 100644 --- a/src/factor/factor.rs +++ b/src/factor/factor.rs @@ -1,5 +1,4 @@ #![crate_name = "factor"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. @@ -18,6 +17,7 @@ use std::io::BufferedReader; use std::io::stdio::stdin_raw; #[path="../common/util.rs"] +#[macro_use] mod util; static VERSION: &'static str = "1.0.0"; diff --git a/src/fmt/fmt.rs b/src/fmt/fmt.rs index eaee850c4..6168273a0 100644 --- a/src/fmt/fmt.rs +++ b/src/fmt/fmt.rs @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate core; extern crate getopts; @@ -19,7 +17,6 @@ use std::io::stdio::{stdin_raw, stdout_raw}; use linebreak::break_lines; use parasplit::ParagraphStream; -#[macro_export] macro_rules! silent_unwrap( ($exp:expr) => ( match $exp { @@ -28,7 +25,9 @@ macro_rules! silent_unwrap( } ) ); + #[path = "../common/util.rs"] +#[macro_use] mod util; mod linebreak; mod parasplit; diff --git a/src/fold/fold.rs b/src/fold/fold.rs index 08a12cc6a..b66fcb674 100644 --- a/src/fold/fold.rs +++ b/src/fold/fold.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -19,6 +17,7 @@ use std::io::fs::File; use std::io::BufferedReader; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "fold"; diff --git a/src/groups/groups.rs b/src/groups/groups.rs index b1989e14b..7db857155 100644 --- a/src/groups/groups.rs +++ b/src/groups/groups.rs @@ -8,8 +8,6 @@ * file that was distributed with this source code. * */ -#![feature(macro_rules)] - extern crate getopts; use getopts::{ @@ -19,7 +17,7 @@ use getopts::{ }; use c_types::{get_pw_from_args, group}; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; #[path = "../common/c_types.rs"] mod c_types; static NAME: &'static str = "groups"; diff --git a/src/hashsum/hashsum.rs b/src/hashsum/hashsum.rs index 2a00f3276..04adbf93d 100644 --- a/src/hashsum/hashsum.rs +++ b/src/hashsum/hashsum.rs @@ -11,8 +11,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate regex; extern crate crypto; @@ -31,6 +29,7 @@ use crypto::sha1::Sha1; use crypto::sha2::{Sha224, Sha256, Sha384, Sha512}; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "hashsum"; diff --git a/src/head/head.rs b/src/head/head.rs index 941bc7726..af0382c2f 100644 --- a/src/head/head.rs +++ b/src/head/head.rs @@ -10,8 +10,6 @@ * Synced with: https://raw.github.com/avsm/src/master/usr.bin/head/head.c */ -#![feature(macro_rules)] - extern crate getopts; use std::char::UnicodeChar; @@ -23,6 +21,7 @@ use std::str::from_utf8; use getopts::{optopt, optflag, getopts, usage}; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "head"; diff --git a/src/hostid/hostid.rs b/src/hostid/hostid.rs index 05dc6dabf..f4902fa5a 100644 --- a/src/hostid/hostid.rs +++ b/src/hostid/hostid.rs @@ -1,6 +1,4 @@ #![crate_name = "hostid"] -#![feature(macro_rules)] -#![feature(phase)] /* * This file is part of the uutils coreutils package. @@ -18,7 +16,7 @@ extern crate serialize; extern crate libc; -#[phase(plugin, link)] extern crate log; +#[macro_use] extern crate log; use getopts::{ getopts, @@ -29,6 +27,7 @@ use getopts::{ use libc::{c_long}; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "hostid"; diff --git a/src/hostname/hostname.rs b/src/hostname/hostname.rs index d6dcf0b97..d0f7d8994 100644 --- a/src/hostname/hostname.rs +++ b/src/hostname/hostname.rs @@ -12,8 +12,6 @@ * https://www.opensource.apple.com/source/shell_cmds/shell_cmds-170/hostname/hostname.c?txt */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -23,6 +21,7 @@ use std::str; use getopts::{optflag, getopts, usage}; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "hostname"; diff --git a/src/id/id.rs b/src/id/id.rs index 1c160129e..442957779 100644 --- a/src/id/id.rs +++ b/src/id/id.rs @@ -14,7 +14,6 @@ */ #![allow(non_camel_case_types)] -#![feature(macro_rules)] extern crate getopts; extern crate libc; @@ -36,7 +35,7 @@ use c_types::{ group }; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; #[path = "../common/c_types.rs"] mod c_types; #[cfg(not(target_os = "linux"))] diff --git a/src/kill/kill.rs b/src/kill/kill.rs index 379fa4e5e..abd556da7 100644 --- a/src/kill/kill.rs +++ b/src/kill/kill.rs @@ -1,6 +1,4 @@ #![crate_name = "kill"] -#![feature(macro_rules)] -#![feature(phase)] /* * This file is part of the uutils coreutils package. @@ -17,7 +15,7 @@ extern crate libc; extern crate collections; extern crate serialize; -#[phase(plugin, link)] extern crate log; +#[macro_use] extern crate log; use std::io::process::Process; @@ -32,6 +30,7 @@ use getopts::{ use signals::ALL_SIGNALS; #[path = "../common/util.rs"] +#[macro_use] mod util; #[path = "../common/signals.rs"] diff --git a/src/link/link.rs b/src/link/link.rs index a0ab5c582..121aad5b7 100644 --- a/src/link/link.rs +++ b/src/link/link.rs @@ -1,5 +1,4 @@ #![crate_name = "link"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. @@ -16,6 +15,7 @@ use std::io::fs::link; use std::path::Path; #[path="../common/util.rs"] +#[macro_use] mod util; static NAME : &'static str = "link"; diff --git a/src/logname/logname.rs b/src/logname/logname.rs index 6213822b3..0571640e1 100644 --- a/src/logname/logname.rs +++ b/src/logname/logname.rs @@ -13,15 +13,13 @@ #![allow(non_camel_case_types)] -#![feature(macro_rules)] - extern crate getopts; extern crate libc; use std::io::print; use libc::c_char; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; extern { // POSIX requires using getlogin (or equivalent code) diff --git a/src/mkdir/mkdir.rs b/src/mkdir/mkdir.rs index cd38180d1..c07fb0a62 100644 --- a/src/mkdir/mkdir.rs +++ b/src/mkdir/mkdir.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -19,6 +17,7 @@ use std::io::FilePermission; use std::num::from_str_radix; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "mkdir"; diff --git a/src/mkfifo/mkfifo.rs b/src/mkfifo/mkfifo.rs index cd11902f4..7ef335874 100644 --- a/src/mkfifo/mkfifo.rs +++ b/src/mkfifo/mkfifo.rs @@ -1,5 +1,4 @@ #![crate_name = "mkfifo"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. @@ -18,6 +17,7 @@ use std::os; use libc::funcs::posix88::stat_::mkfifo; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME : &'static str = "mkfifo"; diff --git a/src/mv/mv.rs b/src/mv/mv.rs index 526b2865a..183fb95e5 100644 --- a/src/mv/mv.rs +++ b/src/mv/mv.rs @@ -10,8 +10,6 @@ * that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; use std::io::{BufferedReader, IoResult, fs}; @@ -28,6 +26,7 @@ use getopts::{ use std::borrow::ToOwned; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "mv"; diff --git a/src/nice/nice.rs b/src/nice/nice.rs index a2069ed58..4573e8eb4 100644 --- a/src/nice/nice.rs +++ b/src/nice/nice.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -26,6 +24,7 @@ const VERSION: &'static str = "1.0.0"; const PRIO_PROCESS: c_int = 0; #[path = "../common/util.rs"] +#[macro_use] mod util; extern { diff --git a/src/nl/nl.rs b/src/nl/nl.rs index 3d2e2e95e..4d505030b 100644 --- a/src/nl/nl.rs +++ b/src/nl/nl.rs @@ -1,5 +1,4 @@ #![crate_name = "nl"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. * @@ -10,9 +9,7 @@ * */ -#![feature(phase)] -#[phase(plugin)] -extern crate regex_macros; +#[macro_use] extern crate regex_macros; extern crate regex; extern crate getopts; @@ -24,6 +21,7 @@ use std::path::Path; use getopts::{optopt, optflag, getopts, usage, OptGroup}; #[path="../common/util.rs"] +#[macro_use] mod util; mod helper; diff --git a/src/nohup/nohup.rs b/src/nohup/nohup.rs index f93fc44c6..8792f526f 100644 --- a/src/nohup/nohup.rs +++ b/src/nohup/nohup.rs @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ -#![feature(globs, macro_rules)] extern crate getopts; extern crate libc; @@ -22,7 +21,7 @@ use libc::consts::os::posix88::SIGHUP; use libc::funcs::posix01::signal::signal; use libc::consts::os::posix01::SIG_IGN; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; #[path = "../common/c_types.rs"] mod c_types; static NAME: &'static str = "nohup"; diff --git a/src/nproc/nproc.rs b/src/nproc/nproc.rs index 8bc88156d..f90ae46e2 100644 --- a/src/nproc/nproc.rs +++ b/src/nproc/nproc.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; use std::os; @@ -19,6 +17,7 @@ static NAME : &'static str = "nproc"; static VERSION : &'static str = "0.0.0"; #[path = "../common/util.rs"] +#[macro_use] mod util; pub fn uumain(args: Vec) -> int { diff --git a/src/paste/paste.rs b/src/paste/paste.rs index 04b77ee4c..72af5d141 100644 --- a/src/paste/paste.rs +++ b/src/paste/paste.rs @@ -9,14 +9,13 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; use std::io; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "paste"; diff --git a/src/printenv/printenv.rs b/src/printenv/printenv.rs index ef442e71e..70b7c028f 100644 --- a/src/printenv/printenv.rs +++ b/src/printenv/printenv.rs @@ -11,8 +11,6 @@ /* last synced with: printenv (GNU coreutils) 8.13 */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -20,6 +18,7 @@ use std::os; use std::io::print; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "printenv"; diff --git a/src/pwd/pwd.rs b/src/pwd/pwd.rs index 5a3f94c53..52af689aa 100644 --- a/src/pwd/pwd.rs +++ b/src/pwd/pwd.rs @@ -9,14 +9,13 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; use std::io::print; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "pwd"; diff --git a/src/realpath/realpath.rs b/src/realpath/realpath.rs index 6a2eba810..05e901a03 100644 --- a/src/realpath/realpath.rs +++ b/src/realpath/realpath.rs @@ -9,13 +9,12 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] extern crate getopts; extern crate libc; use getopts::{optflag, getopts, usage}; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; static NAME: &'static str = "realpath"; static VERSION: &'static str = "1.0.0"; diff --git a/src/relpath/relpath.rs b/src/relpath/relpath.rs index 025a55a7b..2d2337a45 100644 --- a/src/relpath/relpath.rs +++ b/src/relpath/relpath.rs @@ -9,13 +9,12 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] extern crate getopts; extern crate libc; use getopts::{optflag, optopt, getopts, usage}; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; static NAME: &'static str = "relpath"; static VERSION: &'static str = "1.0.0"; diff --git a/src/rm/rm.rs b/src/rm/rm.rs index f5d13030c..dc876701f 100644 --- a/src/rm/rm.rs +++ b/src/rm/rm.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -18,6 +16,7 @@ use std::io::{print, stdin, stdio, fs, BufferedReader}; use std::io::fs::PathExtensions; #[path = "../common/util.rs"] +#[macro_use] mod util; #[deriving(Eq, PartialEq)] diff --git a/src/rmdir/rmdir.rs b/src/rmdir/rmdir.rs index 5d33ff4ed..06fa2700a 100644 --- a/src/rmdir/rmdir.rs +++ b/src/rmdir/rmdir.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -18,6 +16,7 @@ use std::io::{print, fs}; use std::io::fs::PathExtensions; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "rmdir"; diff --git a/src/seq/seq.rs b/src/seq/seq.rs index a396b0ec2..ccd1a4eae 100644 --- a/src/seq/seq.rs +++ b/src/seq/seq.rs @@ -1,7 +1,5 @@ #![crate_name = "seq"] -#![feature(macro_rules)] - // TODO: Make -w flag work with decimals // TODO: Support -f flag @@ -11,6 +9,7 @@ extern crate libc; use std::cmp; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "seq"; diff --git a/src/shuf/shuf.rs b/src/shuf/shuf.rs index 07d15529f..18c9ea066 100644 --- a/src/shuf/shuf.rs +++ b/src/shuf/shuf.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -23,6 +21,7 @@ use std::rand::{mod, Rng}; use std::uint; #[path = "../common/util.rs"] +#[macro_use] mod util; enum Mode { diff --git a/src/sleep/sleep.rs b/src/sleep/sleep.rs index 4133f1a04..a356f2937 100644 --- a/src/sleep/sleep.rs +++ b/src/sleep/sleep.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -19,6 +17,7 @@ use std::io::{print, timer}; use std::time::duration::{mod, Duration}; #[path = "../common/util.rs"] +#[macro_use] mod util; #[path = "../common/time.rs"] diff --git a/src/sort/sort.rs b/src/sort/sort.rs index 28c6226c8..596a59fe0 100644 --- a/src/sort/sort.rs +++ b/src/sort/sort.rs @@ -1,5 +1,4 @@ #![crate_name = "sort"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. @@ -20,6 +19,7 @@ use std::io::stdio::stdin_raw; use std::str::Chars; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "sort"; diff --git a/src/split/split.rs b/src/split/split.rs index 81d85db67..6dd2e33f7 100644 --- a/src/split/split.rs +++ b/src/split/split.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -19,6 +17,7 @@ use std::num::Int; use std::char; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "split"; diff --git a/src/sum/sum.rs b/src/sum/sum.rs index 05649085d..a81a3241f 100644 --- a/src/sum/sum.rs +++ b/src/sum/sum.rs @@ -1,5 +1,4 @@ #![crate_name = "sum"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. @@ -17,6 +16,7 @@ use std::io::{File, IoResult, print}; use std::io::stdio::{stdin_raw}; #[path="../common/util.rs"] +#[macro_use] mod util; static VERSION: &'static str = "1.0.0"; diff --git a/src/sync/sync.rs b/src/sync/sync.rs index 898242f48..d3dad9efc 100644 --- a/src/sync/sync.rs +++ b/src/sync/sync.rs @@ -10,14 +10,12 @@ /* Last synced with: sync (GNU coreutils) 8.13 */ - #![feature(macro_rules)] - extern crate getopts; extern crate libc; use getopts::{optflag, getopts, usage}; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; static NAME: &'static str = "sync"; static VERSION: &'static str = "1.0.0"; diff --git a/src/tac/tac.rs b/src/tac/tac.rs index cadbd43e4..57238c230 100644 --- a/src/tac/tac.rs +++ b/src/tac/tac.rs @@ -9,14 +9,13 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; use std::io; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "tac"; diff --git a/src/tail/tail.rs b/src/tail/tail.rs index af95a4685..b09f98cd5 100644 --- a/src/tail/tail.rs +++ b/src/tail/tail.rs @@ -9,8 +9,6 @@ * */ -#![feature(macro_rules)] - extern crate getopts; use std::char::UnicodeChar; @@ -25,6 +23,7 @@ use std::io::timer::sleep; use std::time::duration::Duration; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "tail"; diff --git a/src/timeout/timeout.rs b/src/timeout/timeout.rs index 1f59c6ac2..2ce570618 100644 --- a/src/timeout/timeout.rs +++ b/src/timeout/timeout.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -18,6 +16,7 @@ use std::io::{PathDoesntExist, FileNotFound}; use std::io::process::{Command, ExitStatus, ExitSignal, InheritFd}; #[path = "../common/util.rs"] +#[macro_use] mod util; #[path = "../common/time.rs"] diff --git a/src/touch/touch.rs b/src/touch/touch.rs index 6c99b9880..07a37aad9 100644 --- a/src/touch/touch.rs +++ b/src/touch/touch.rs @@ -1,5 +1,4 @@ #![crate_name = "touch"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. @@ -17,6 +16,7 @@ use std::io::File; use std::io::fs::PathExtensions; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "touch"; diff --git a/src/tr/tr.rs b/src/tr/tr.rs index 337711833..e8fb644a5 100644 --- a/src/tr/tr.rs +++ b/src/tr/tr.rs @@ -1,5 +1,4 @@ #![crate_name = "tr"] -#![feature(macro_rules)] /* * This file is part of the uutils coreutils package. @@ -22,6 +21,7 @@ use std::iter::FromIterator; use std::vec::Vec; #[path="../common/util.rs"] +#[macro_use] mod util; static NAME : &'static str = "tr"; diff --git a/src/truncate/truncate.rs b/src/truncate/truncate.rs index b8e87a04c..f2a680012 100644 --- a/src/truncate/truncate.rs +++ b/src/truncate/truncate.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -19,6 +17,7 @@ use std::io::{File, Open, ReadWrite, fs}; use std::io::fs::PathExtensions; #[path = "../common/util.rs"] +#[macro_use] mod util; #[deriving(Eq, PartialEq)] diff --git a/src/tsort/tsort.rs b/src/tsort/tsort.rs index c4dd9659c..198c19933 100644 --- a/src/tsort/tsort.rs +++ b/src/tsort/tsort.rs @@ -10,8 +10,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -19,6 +17,7 @@ use std::io; use std::collections::{HashSet, HashMap}; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "tsort"; diff --git a/src/tty/tty.rs b/src/tty/tty.rs index 219456087..3c08489c5 100644 --- a/src/tty/tty.rs +++ b/src/tty/tty.rs @@ -14,8 +14,6 @@ #![allow(dead_code)] -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -24,6 +22,7 @@ use std::io::stdio::stderr; use getopts::{optflag,getopts}; #[path = "../common/util.rs"] +#[macro_use] mod util; extern { diff --git a/src/uname/uname.rs b/src/uname/uname.rs index 9772f8034..c7e8a1ff1 100644 --- a/src/uname/uname.rs +++ b/src/uname/uname.rs @@ -12,7 +12,6 @@ /* last synced with: uname (GNU coreutils) 8.21 */ #![allow(non_camel_case_types)] -#![feature(macro_rules)] extern crate getopts; extern crate libc; @@ -21,7 +20,7 @@ use std::mem::uninitialized; use std::io::print; use c_types::utsname; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; #[path = "../common/c_types.rs"] mod c_types; struct utsrust { diff --git a/src/unexpand/unexpand.rs b/src/unexpand/unexpand.rs index 58deef87a..fb1393760 100644 --- a/src/unexpand/unexpand.rs +++ b/src/unexpand/unexpand.rs @@ -9,14 +9,13 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; use std::io; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "unexpand"; diff --git a/src/uniq/uniq.rs b/src/uniq/uniq.rs index 61b19f1d7..bc4642f4c 100644 --- a/src/uniq/uniq.rs +++ b/src/uniq/uniq.rs @@ -9,8 +9,6 @@ * */ -#![feature(macro_rules)] - extern crate getopts; use std::ascii::OwnedAsciiExt; @@ -19,6 +17,7 @@ use std::str::FromStr; use std::io; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "uniq"; diff --git a/src/unlink/unlink.rs b/src/unlink/unlink.rs index 36c38fa3d..4f307e3f2 100644 --- a/src/unlink/unlink.rs +++ b/src/unlink/unlink.rs @@ -11,8 +11,6 @@ /* last synced with: unlink (GNU coreutils) 8.21 */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -21,6 +19,7 @@ use std::io::fs::{mod, PathExtensions}; use std::io::print; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "unlink"; diff --git a/src/uptime/uptime.rs b/src/uptime/uptime.rs index 2bc30317d..a819bb4fa 100644 --- a/src/uptime/uptime.rs +++ b/src/uptime/uptime.rs @@ -12,7 +12,6 @@ /* last synced with: cat (GNU coreutils) 8.13 */ #![allow(non_camel_case_types)] -#![feature(macro_rules, globs)] extern crate getopts; extern crate libc; @@ -24,7 +23,7 @@ use std::ptr::null; use libc::{time_t, c_double, c_int, c_char}; use utmpx::*; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; #[path = "../common/c_types.rs"] mod c_types; diff --git a/src/users/users.rs b/src/users/users.rs index 74857fad8..122de7022 100644 --- a/src/users/users.rs +++ b/src/users/users.rs @@ -14,8 +14,6 @@ // Allow dead code here in order to keep all fields, constants here, for consistency. #![allow(dead_code, non_camel_case_types)] -#![feature(macro_rules, globs)] - extern crate getopts; extern crate libc; @@ -25,6 +23,7 @@ use std::ptr; use utmpx::*; #[path = "../common/util.rs"] +#[macro_use] mod util; #[path = "../common/utmpx.rs"] diff --git a/src/wc/wc.rs b/src/wc/wc.rs index 0ac4e6605..75f20d347 100644 --- a/src/wc/wc.rs +++ b/src/wc/wc.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; @@ -23,6 +21,7 @@ use std::result::Result as StdResult; use getopts::Matches; #[path = "../common/util.rs"] +#[macro_use] mod util; struct Result { diff --git a/src/whoami/whoami.rs b/src/whoami/whoami.rs index 97f4b9bb9..bfc9fea31 100644 --- a/src/whoami/whoami.rs +++ b/src/whoami/whoami.rs @@ -13,14 +13,12 @@ #![allow(non_camel_case_types)] -#![feature(macro_rules)] - extern crate getopts; extern crate libc; use std::io::print; -#[path = "../common/util.rs"] mod util; +#[path = "../common/util.rs"] #[macro_use] mod util; #[cfg(unix)] mod platform { diff --git a/src/yes/yes.rs b/src/yes/yes.rs index 6f0fbb065..e7143f42b 100644 --- a/src/yes/yes.rs +++ b/src/yes/yes.rs @@ -11,14 +11,13 @@ /* last synced with: yes (GNU coreutils) 8.13 */ -#![feature(macro_rules)] - extern crate getopts; extern crate libc; use std::io::print; #[path = "../common/util.rs"] +#[macro_use] mod util; static NAME: &'static str = "yes"; diff --git a/test/mv.rs b/test/mv.rs index b853d327c..b5d5916a8 100644 --- a/test/mv.rs +++ b/test/mv.rs @@ -1,5 +1,3 @@ -#![feature(macro_rules)] - extern crate time; use std::io::{process, fs, FilePermission};