Skip to content

Commit fa6959f

Browse files
nodakaiSimonSapin
authored andcommitted
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 <[email protected]>
1 parent b7deb90 commit fa6959f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/libstd/ascii.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -582,15 +582,15 @@ mod tests {
582582
assert_eq!('A'.to_ascii().to_char(), 'A');
583583
assert_eq!('A'.to_ascii().to_byte(), 65u8);
584584

585-
assert_eq!('A'.to_ascii().to_lower().to_char(), 'a');
586-
assert_eq!('Z'.to_ascii().to_lower().to_char(), 'z');
587-
assert_eq!('a'.to_ascii().to_upper().to_char(), 'A');
588-
assert_eq!('z'.to_ascii().to_upper().to_char(), 'Z');
589-
590-
assert_eq!('@'.to_ascii().to_lower().to_char(), '@');
591-
assert_eq!('['.to_ascii().to_lower().to_char(), '[');
592-
assert_eq!('`'.to_ascii().to_upper().to_char(), '`');
593-
assert_eq!('{'.to_ascii().to_upper().to_char(), '{');
585+
assert_eq!('A'.to_ascii().to_lowercase().to_char(), 'a');
586+
assert_eq!('Z'.to_ascii().to_lowercase().to_char(), 'z');
587+
assert_eq!('a'.to_ascii().to_uppercase().to_char(), 'A');
588+
assert_eq!('z'.to_ascii().to_uppercase().to_char(), 'Z');
589+
590+
assert_eq!('@'.to_ascii().to_lowercase().to_char(), '@');
591+
assert_eq!('['.to_ascii().to_lowercase().to_char(), '[');
592+
assert_eq!('`'.to_ascii().to_uppercase().to_char(), '`');
593+
assert_eq!('{'.to_ascii().to_uppercase().to_char(), '{');
594594

595595
assert!('0'.to_ascii().is_digit());
596596
assert!('9'.to_ascii().is_digit());

0 commit comments

Comments
 (0)