about summary refs log tree commit diff
path: root/src/liballoc/tests/string.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-03 18:40:23 +0000
committerbors <bors@rust-lang.org>2019-02-03 18:40:23 +0000
commit4f4f4a40b6c7bcb6fa07ee6575e8a9759ba08922 (patch)
tree28a3d197b75da9125cc8f6de8d912f75c56e7e48 /src/liballoc/tests/string.rs
parente858c2637fa5bac40ac450628b30c56c2b4327b4 (diff)
parent2396780cdaedf097dd6a8f3927749bcaf5b1238b (diff)
downloadrust-4f4f4a40b6c7bcb6fa07ee6575e8a9759ba08922.tar.gz
rust-4f4f4a40b6c7bcb6fa07ee6575e8a9759ba08922.zip
Auto merge of #58081 - Centril:liballoc-2018, r=oli-obk
Transition liballoc to Rust 2018

This transitions liballoc to Rust 2018 edition and applies relevant idiom lints.
I also did a small bit of drive-by cleanup along the way.

r? @oli-obk

I started with liballoc since it seemed easiest. In particular, adding `edition = "2018"` to libcore gave me way too many errors due to stdsimd. Ideally we should be able to continue this crate-by-crate until all crates use 2018.
Diffstat (limited to 'src/liballoc/tests/string.rs')
-rw-r--r--src/liballoc/tests/string.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/tests/string.rs b/src/liballoc/tests/string.rs
index 8a5bfca8b7d..e5ce51a36ee 100644
--- a/src/liballoc/tests/string.rs
+++ b/src/liballoc/tests/string.rs
@@ -21,7 +21,7 @@ impl<'a> IntoCow<'a, str> for &'a str {
 
 #[test]
 fn test_from_str() {
-    let owned: Option<::std::string::String> = "string".parse().ok();
+    let owned: Option<std::string::String> = "string".parse().ok();
     assert_eq!(owned.as_ref().map(|s| &**s), Some("string"));
 }
 
@@ -122,7 +122,7 @@ fn test_from_utf16() {
         let s_as_utf16 = s.encode_utf16().collect::<Vec<u16>>();
         let u_as_string = String::from_utf16(&u).unwrap();
 
-        assert!(::core::char::decode_utf16(u.iter().cloned()).all(|r| r.is_ok()));
+        assert!(core::char::decode_utf16(u.iter().cloned()).all(|r| r.is_ok()));
         assert_eq!(s_as_utf16, u);
 
         assert_eq!(u_as_string, s);