rollup merge of #19972: alexcrichton/snapshots

Conflicts:
	src/libcollections/string.rs
	src/libcollections/vec.rs
	src/snapshots.txt
This commit is contained in:
Alex Crichton 2014-12-21 00:07:29 -08:00
commit dbeef0edb2
11 changed files with 0 additions and 833 deletions

View file

@ -862,28 +862,7 @@ impl<'a, S: Str> Equiv<S> for String {
}
}
// NOTE(stage0): Remove impl after a snapshot
#[cfg(stage0)]
#[experimental = "waiting on Add stabilization"]
impl<S: Str> Add<S, String> for String {
/// Concatenates `self` and `other` as a new mutable `String`.
///
/// # Examples
///
/// ```
/// let string1 = "foo".to_string();
/// let string2 = "bar".to_string();
/// let string3 = string1 + string2;
/// assert_eq!(string3, "foobar".to_string());
/// ```
fn add(&self, other: &S) -> String {
let mut s = String::from_str(self.as_slice());
s.push_str(other.as_slice());
return s;
}
}
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
impl<'a> Add<&'a str, String> for String {
fn add(mut self, other: &str) -> String {
self.push_str(other);