// It's cleaner to just turn off the unused_imports warning than to fix them.
#![allow(unused_imports)]
-use core::borrow::Borrow;
+use core::borrow::{Borrow, BorrowMut};
use core::str::pattern::{Pattern, Searcher, ReverseSearcher, DoubleEndedSearcher};
use core::mem;
use core::ptr;
}
}
+#[stable(feature = "string_borrow_mut", since = "1.36.0")]
+impl BorrowMut<str> for String {
+ #[inline]
+ fn borrow_mut(&mut self) -> &mut str {
+ &mut self[..]
+ }
+}
+
#[stable(feature = "rust1", since = "1.0.0")]
impl ToOwned for str {
type Owned = String;