]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #34890 - oconnor663:addassign, r=brson
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 21 Jul 2016 09:27:00 +0000 (11:27 +0200)
committerGitHub <noreply@github.com>
Thu, 21 Jul 2016 09:27:00 +0000 (11:27 +0200)
implement AddAssign for String

Currently `String` implements `Add` but not `AddAssign`. This PR fills in that gap.

I played around with having `AddAssign` (and `Add` and `push_str`) take `AsRef<str>` instead of `&str`, but it looks like that breaks arguments that implement `Deref<Target=str>` and not `AsRef<str>`. Comments in [`libcore/convert.rs`](https://github.com/rust-lang/rust/blob/master/src/libcore/convert.rs#L207-L213) make it sound like we could fix this with a blanket impl eventually. Does anyone know what's blocking that?

1  2 
src/libcollections/string.rs

Simple merge