Skip to content

Commit bdad702

Browse files
authored
Auto merge of #36685 - brson:rev-string-from, r=sfackler
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
2 parents 41e3aee + 2e02803 commit bdad702

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/libcollections/string.rs

-20
Original file line numberDiff line numberDiff line change
@@ -1902,26 +1902,6 @@ impl Into<Vec<u8>> for String {
19021902
}
19031903
}
19041904

1905-
#[stable(feature = "stringfromchars", since = "1.12.0")]
1906-
impl<'a> From<&'a [char]> for String {
1907-
#[inline]
1908-
fn from(v: &'a [char]) -> String {
1909-
let mut s = String::with_capacity(v.len());
1910-
for c in v {
1911-
s.push(*c);
1912-
}
1913-
s
1914-
}
1915-
}
1916-
1917-
#[stable(feature = "stringfromchars", since = "1.12.0")]
1918-
impl From<Vec<char>> for String {
1919-
#[inline]
1920-
fn from(v: Vec<char>) -> String {
1921-
String::from(v.as_slice())
1922-
}
1923-
}
1924-
19251905
#[stable(feature = "rust1", since = "1.0.0")]
19261906
impl fmt::Write for String {
19271907
#[inline]

0 commit comments

Comments
 (0)