We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64d32b0 commit 2ff4243Copy full SHA for 2ff4243
src/libcollections/string.rs
@@ -93,8 +93,8 @@ impl String {
93
/// assert_eq!(&s[..], "hello");
94
/// ```
95
#[inline]
96
- #[unstable(feature = "collections",
97
- reason = "needs investigation to see if to_string() can match perf")]
+ #[unstable(feature = "collections", reason = "use `String::from` instead")]
+ #[deprecated(since = "1.2.0", reason = "use `String::from` instead")]
98
#[cfg(not(test))]
99
pub fn from_str(string: &str) -> String {
100
String { vec: <[_]>::to_vec(string.as_bytes()) }
0 commit comments