about summary refs log tree commit diff
path: root/src/liballoc/str.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/str.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/str.rs')
-rw-r--r--src/liballoc/str.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index 53dd1a5df30..1fd4c9978a6 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -28,20 +28,20 @@
 // It's cleaner to just turn off the unused_imports warning than to fix them.
 #![allow(unused_imports)]
 
+use core::borrow::Borrow;
 use core::fmt;
 use core::str as core_str;
-use core::str::pattern::Pattern;
-use core::str::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher};
+use core::str::pattern::{Pattern, Searcher, ReverseSearcher, DoubleEndedSearcher};
 use core::mem;
 use core::ptr;
 use core::iter::FusedIterator;
 use core::unicode::conversions;
 
-use borrow::{Borrow, ToOwned};
-use boxed::Box;
-use slice::{SliceConcatExt, SliceIndex};
-use string::String;
-use vec::Vec;
+use crate::borrow::ToOwned;
+use crate::boxed::Box;
+use crate::slice::{SliceConcatExt, SliceIndex};
+use crate::string::String;
+use crate::vec::Vec;
 
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core::str::{FromStr, Utf8Error};