Skip to content

Commit

Permalink
Auto merge of #36685 - brson:rev-string-from, r=sfackler
Browse files Browse the repository at this point in the history
Revert "implement `From<Vec<char>>` and `From<&'a [char]>` for `String`"

This reverts commit ac73335.

This is a revert of #35054, which resulted in at least 7 known regressions, reported [here](https://internals.rust-lang.org/t/regression-report-stable-2016-08-16-vs-beta-2016-09-21/4119) and [here](#36352), which will hit stable next week.

I think this breakage was somewhat unanticipated, and we did not realize so many crates were broken until this week, so reverting is the conservative thing to do until we figure out how not to cause so much breakage. I've run crater on the revert and did not find any new breakage from the revert.

Fixes #36352

cc @pwoolcoc @rust-lang/libs
  • Loading branch information
bors committed Sep 24, 2016
2 parents 41e3aee + 2e02803 commit bdad702
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/libcollections/string.rs
Expand Up @@ -1902,26 +1902,6 @@ impl Into<Vec<u8>> for String {
}
}

#[stable(feature = "stringfromchars", since = "1.12.0")]
impl<'a> From<&'a [char]> for String {
#[inline]
fn from(v: &'a [char]) -> String {
let mut s = String::with_capacity(v.len());
for c in v {
s.push(*c);
}
s
}
}

#[stable(feature = "stringfromchars", since = "1.12.0")]
impl From<Vec<char>> for String {
#[inline]
fn from(v: Vec<char>) -> String {
String::from(v.as_slice())
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Write for String {
#[inline]
Expand Down

0 comments on commit bdad702

Please sign in to comment.