Skip to content

Commit 9b67bd4

Browse files
committedMay 1, 2019
Auto merge of #60435 - Centril:rollup-aa5lmuw, r=Centril
Rollup of 7 pull requests Successful merges: - #60287 (Use references for variances_of) - #60327 (Search for incompatible universes in borrow errors) - #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1) - #60366 (build-gcc: Create missing cc symlink) - #60369 (Support ZSTs in DispatchFromDyn) - #60404 (Implement `BorrowMut<str>` for `String`) - #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.) Failed merges: r? @ghost
2 parents 6cc24f2 + e5b6997 commit 9b67bd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+759
-462
lines changed
 

‎src/ci/docker/dist-x86_64-linux/build-gcc.sh

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ hide_output ../gcc-$GCC/configure \
3232
--enable-languages=c,c++
3333
hide_output make -j10
3434
hide_output make install
35+
ln -s gcc /rustroot/bin/cc
3536

3637
cd ..
3738
rm -rf gcc-build

‎src/liballoc/str.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// It's cleaner to just turn off the unused_imports warning than to fix them.
2929
#![allow(unused_imports)]
3030

31-
use core::borrow::Borrow;
31+
use core::borrow::{Borrow, BorrowMut};
3232
use core::str::pattern::{Pattern, Searcher, ReverseSearcher, DoubleEndedSearcher};
3333
use core::mem;
3434
use core::ptr;
@@ -190,6 +190,14 @@ impl Borrow<str> for String {
190190
}
191191
}
192192

193+
#[stable(feature = "string_borrow_mut", since = "1.36.0")]
194+
impl BorrowMut<str> for String {
195+
#[inline]
196+
fn borrow_mut(&mut self) -> &mut str {
197+
&mut self[..]
198+
}
199+
}
200+
193201
#[stable(feature = "rust1", since = "1.0.0")]
194202
impl ToOwned for str {
195203
type Owned = String;

0 commit comments

Comments
 (0)
Please sign in to comment.