From f27ad3d3e99ce679f782607971a9f6f18befa503 Mon Sep 17 00:00:00 2001 From: "NODA, Kai" Date: Sun, 5 Oct 2014 18:11:17 +0800 Subject: Clean up rustc warnings. compiletest: compact "linux" "macos" etc.as "unix". liballoc: remove a superfluous "use". libcollections: remove invocations of deprecated methods in favor of their suggested replacements and use "_" for a loop counter. libcoretest: remove invocations of deprecated methods; also add "allow(deprecated)" for testing a deprecated method itself. libglob: use "cfg_attr". libgraphviz: add a test for one of data constructors. libgreen: remove a superfluous "use". libnum: "allow(type_overflow)" for type cast into u8 in a test code. librustc: names of static variables should be in upper case. libserialize: v[i] instead of get(). libstd/ascii: to_lowercase() instead of to_lower(). libstd/bitflags: modify AnotherSetOfFlags to use i8 as its backend. It will serve better for testing various aspects of bitflags!. libstd/collections: "allow(deprecated)" for testing a deprecated method itself. libstd/io: remove invocations of deprecated methods and superfluous "use". Also add #[test] where it was missing. libstd/num: introduce a helper function to effectively remove invocations of a deprecated method. libstd/path and rand: remove invocations of deprecated methods and superfluous "use". libstd/task and libsync/comm: "allow(deprecated)" for testing a deprecated method itself. libsync/deque: remove superfluous "unsafe". libsync/mutex and once: names of static variables should be in upper case. libterm: introduce a helper function to effectively remove invocations of a deprecated method. We still see a few warnings about using obsoleted native::task::spawn() in the test modules for libsync. I'm not sure how I should replace them with std::task::TaksBuilder and native::task::NativeTaskBuilder (dependency to libstd?) Signed-off-by: NODA, Kai --- src/libstd/path/posix.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index f7fb9adb1fb..27eafdab642 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -775,7 +775,7 @@ mod tests { t!(s: "a/b/c", ["d".to_string(), "e".to_string()], "a/b/c/d/e"); t!(v: b"a/b/c", [b"d", b"e"], b"a/b/c/d/e"); t!(v: b"a/b/c", [b"d", b"/e", b"f"], b"/e/f"); - t!(v: b"a/b/c", [Vec::from_slice(b"d"), Vec::from_slice(b"e")], b"a/b/c/d/e"); + t!(v: b"a/b/c", [b"d".to_vec(), b"e".to_vec()], b"a/b/c/d/e"); } #[test] @@ -879,7 +879,7 @@ mod tests { t!(s: "a/b/c", ["d", "/e", "f"], "/e/f"); t!(s: "a/b/c", ["d".to_string(), "e".to_string()], "a/b/c/d/e"); t!(v: b"a/b/c", [b"d", b"e"], b"a/b/c/d/e"); - t!(v: b"a/b/c", [Vec::from_slice(b"d"), Vec::from_slice(b"e")], b"a/b/c/d/e"); + t!(v: b"a/b/c", [b"d".to_vec(), b"e".to_vec()], b"a/b/c/d/e"); } #[test] -- cgit 1.4.1-3-g733a5