diff --git a/deps/regex b/deps/regex index 8b44176a9..b8cc898f1 160000 --- a/deps/regex +++ b/deps/regex @@ -1 +1 @@ -Subproject commit 8b44176a91326ec0b5e33bc36443ba00cb528c16 +Subproject commit b8cc898f17442e5769cbce081d884e47d28c54e5 diff --git a/deps/rust-crypto b/deps/rust-crypto index d06c8672a..e2ba6ea92 160000 --- a/deps/rust-crypto +++ b/deps/rust-crypto @@ -1 +1 @@ -Subproject commit d06c8672a212add38edfcc5b504e4b4cb30c5a8b +Subproject commit e2ba6ea926782278222558557d3d87221b87c740 diff --git a/mkmain.rs b/mkmain.rs index b33c735aa..d7657818e 100644 --- a/mkmain.rs +++ b/mkmain.rs @@ -1,10 +1,10 @@ -#![feature(core, env, old_io, old_path)] +#![feature(core, exit_status, old_io, old_path)] use std::env; use std::old_io::{File, Truncate, ReadWrite}; use std::old_path::Path; static TEMPLATE: &'static str = "\ -#![feature(env)] +#![feature(exit_status)] extern crate \"@UTIL_CRATE@\" as uu@UTIL_CRATE@; use std::env; diff --git a/mkuutils.rs b/mkuutils.rs index 48445cdc2..d5b668528 100644 --- a/mkuutils.rs +++ b/mkuutils.rs @@ -1,4 +1,4 @@ -#![feature(core, env, old_io, old_path)] +#![feature(core, exit_status, old_io, old_path)] use std::env; use std::old_io::{File, Truncate, Write}; diff --git a/src/du/du.rs b/src/du/du.rs index 96cab13cc..516ec8e2f 100644 --- a/src/du/du.rs +++ b/src/du/du.rs @@ -268,7 +268,7 @@ ers of 1000).", None => 1024 }; - let convert_size = |&: size: u64| -> String { + let convert_size = |size: u64| -> String { if matches.opt_present("human-readable") || matches.opt_present("si") { if size >= MB { format!("{:.1}M", (size as f64) / (MB as f64)) diff --git a/src/fold/fold.rs b/src/fold/fold.rs index 9e8de9fe6..cb3b47b42 100644 --- a/src/fold/fold.rs +++ b/src/fold/fold.rs @@ -124,7 +124,7 @@ fn fold_file(file: BufferedReader, bytes: bool, spaces: bool, let slice = { let slice = &line[i..i + width]; if spaces && i + width < len { - match slice.rfind(|&: ch: char| ch.is_whitespace()) { + match slice.rfind(|ch: char| ch.is_whitespace()) { Some(m) => &slice[..m + 1], None => slice } diff --git a/src/mv/mv.rs b/src/mv/mv.rs index 890f6b13d..f89f32d49 100644 --- a/src/mv/mv.rs +++ b/src/mv/mv.rs @@ -161,7 +161,7 @@ pub fn uumain(args: Vec) -> i32 { verbose: matches.opt_present("v"), }; - let string_to_path = |&: s: &String| { Path::new(s.as_slice()) }; + let string_to_path = |s: &String| { Path::new(s.as_slice()) }; let paths: Vec = matches.free.iter().map(string_to_path).collect(); if matches.opt_present("version") { diff --git a/src/nl/nl.rs b/src/nl/nl.rs index 7e1e0b9cb..31f052dee 100644 --- a/src/nl/nl.rs +++ b/src/nl/nl.rs @@ -167,7 +167,7 @@ fn nl (reader: &mut BufferedReader, settings: &Settings) { let line_no_width_initial = line_no_width; // Stores the smallest integer with one more digit than line_no, so that // when line_no >= line_no_threshold, we need to use one more digit. - let mut line_no_threshold = Int::pow(10u64, line_no_width); + let mut line_no_threshold = Int::pow(10u64, line_no_width as u32); let mut empty_line_count: u64 = 0; let fill_char = match settings.number_format { NumberFormat::RightZero => '0', @@ -229,7 +229,7 @@ fn nl (reader: &mut BufferedReader, settings: &Settings) { if settings.renumber { line_no = settings.starting_line_number; line_no_width = line_no_width_initial; - line_no_threshold = Int::pow(10u64, line_no_width); + line_no_threshold = Int::pow(10u64, line_no_width as u32); } &settings.header_numbering }, diff --git a/src/od/od.rs b/src/od/od.rs index 32519b3ce..b8dec3845 100644 --- a/src/od/od.rs +++ b/src/od/od.rs @@ -73,12 +73,12 @@ fn main(input_offset_base: &Radix, fname: &str) { match f.read(bytes) { Ok(n) => { print_with_radix(input_offset_base, addr); - for b in range(0, n / std::u16::BYTES) { + for b in range(0, n / std::u16::BYTES as usize) { let bs = &bytes[(2 * b) .. (2 * b + 2)]; let p: u16 = (bs[1] as u16) << 8 | bs[0] as u16; print!(" {:06o}", p); } - if n % std::u16::BYTES == 1 { + if n % std::u16::BYTES as usize == 1 { print!(" {:06o}", bytes[n - 1]); } print!("\n"); diff --git a/src/split/split.rs b/src/split/split.rs index 1a35421e1..b8ba7256f 100644 --- a/src/split/split.rs +++ b/src/split/split.rs @@ -225,7 +225,7 @@ fn str_prefix(i: usize, width: usize) -> String { let mut w = width; while w > 0 { w -= 1; - let div = Int::pow(26 as usize, w); + let div = Int::pow(26 as usize, w as u32); let r = n / div; n -= r * div; c.push(char::from_u32((r as u32) + 97).unwrap()); @@ -240,7 +240,7 @@ fn num_prefix(i: usize, width: usize) -> String { let mut w = width; while w > 0 { w -= 1; - let div = Int::pow(10 as usize, w); + let div = Int::pow(10 as usize, w as u32); let r = n / div; n -= r * div; c.push(char::from_digit(r as u32, 10).unwrap()); diff --git a/src/stdbuf/stdbuf.rs b/src/stdbuf/stdbuf.rs index ec4aa1b70..cc05e8f6b 100644 --- a/src/stdbuf/stdbuf.rs +++ b/src/stdbuf/stdbuf.rs @@ -90,8 +90,8 @@ fn print_usage(opts: &[OptGroup]) { } fn parse_size(size: &str) -> Option { - let ext = size.trim_left_matches(|&: c: char| c.is_digit(10)); - let num = size.trim_right_matches(|&: c: char| c.is_alphabetic()); + let ext = size.trim_left_matches(|c: char| c.is_digit(10)); + let num = size.trim_right_matches(|c: char| c.is_alphabetic()); let mut recovered = num.to_string(); recovered.push_str(ext); if recovered.as_slice() != size { @@ -101,7 +101,7 @@ fn parse_size(size: &str) -> Option { Some(m) => m, None => return None, }; - let (power, base): (usize, u64) = match ext { + let (power, base): (u32, u64) = match ext { "" => (0, 0), "KB" => (1, 1024), "K" => (1, 1000), diff --git a/src/test/test.rs b/src/test/test.rs index b484630bb..5251a997e 100644 --- a/src/test/test.rs +++ b/src/test/test.rs @@ -336,7 +336,7 @@ fn path(path: &[u8], cond: PathCondition) -> bool { Write = 0o2, Execute = 0o1, } - let perm = |&: stat: stat, p: Permission| { + let perm = |stat: stat, p: Permission| { use libc::{getgid, getuid}; let (uid, gid) = unsafe { (getuid(), getgid()) }; if uid == stat.st_uid { diff --git a/src/tr/tr.rs b/src/tr/tr.rs index a35f9c48a..45e85bfd6 100644 --- a/src/tr/tr.rs +++ b/src/tr/tr.rs @@ -96,7 +96,7 @@ fn delete(set: Vec, complement: bool) { bset.insert(c as usize); } - let is_allowed = |&: c : char| { + let is_allowed = |c : char| { if complement { bset.contains(&(c as usize)) } else { diff --git a/src/uutils/uutils.rs b/src/uutils/uutils.rs index 778dc7f33..183b51589 100644 --- a/src/uutils/uutils.rs +++ b/src/uutils/uutils.rs @@ -1,5 +1,5 @@ #![crate_name = "uutils"] -#![feature(core, env, old_path, rustc_private)] +#![feature(core, exit_status, old_path, rustc_private)] /* * This file is part of the uutils coreutils package.