about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
authorRyan Lopopolo <rjl@hyperbo.la>2020-03-10 18:47:19 -0700
committerRyan Lopopolo <rjl@hyperbo.la>2020-03-10 18:47:19 -0700
commit533784d3a247595393ce24c9940945838913a0fe (patch)
treee0d10ebb97295200d965d97d46fd030a405527f7 /src/liballoc/string.rs
parent18feaa3fa25f11e403478b562fa1db356b32c818 (diff)
downloadrust-533784d3a247595393ce24c9940945838913a0fe.tar.gz
rust-533784d3a247595393ce24c9940945838913a0fe.zip
Add docs for From::<&mut str>::from String impl
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 452abe31742..c8928b4f468 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -2227,6 +2227,9 @@ impl From<&str> for String {
 
 #[stable(feature = "from_mut_str_for_string", since = "1.44.0")]
 impl From<&mut str> for String {
+    /// Converts a `&mut str` into a `String`.
+    ///
+    /// The result is allocated on the heap.
     #[inline]
     fn from(s: &mut str) -> String {
         s.to_owned()