Implement RFC 839

Closes #25976.
This commit is contained in:
Johannes Oertel 2015-06-03 12:38:42 +02:00
parent a5979be9fe
commit b36ed7d2ed
22 changed files with 291 additions and 1 deletions

View file

@ -793,6 +793,13 @@ impl Extend<char> for String {
}
}
#[stable(feature = "extend_ref", since = "1.2.0")]
impl<'a> Extend<&'a char> for String {
fn extend<I: IntoIterator<Item=&'a char>>(&mut self, iter: I) {
self.extend(iter.into_iter().cloned());
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> Extend<&'a str> for String {
fn extend<I: IntoIterator<Item=&'a str>>(&mut self, iterable: I) {