about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/liballoc/str.rs1
-rw-r--r--src/liballoc/string.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index 2af89562d69..9916fa639e1 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -203,6 +203,7 @@ impl Borrow<str> for String {
 #[stable(feature = "rust1", since = "1.0.0")]
 impl ToOwned for str {
     type Owned = String;
+    #[inline]
     fn to_owned(&self) -> String {
         unsafe { String::from_utf8_unchecked(self.as_bytes().to_owned()) }
     }
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 837e17cf640..ab3f8fc2707 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -2196,6 +2196,7 @@ impl AsRef<[u8]> for String {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a> From<&'a str> for String {
+    #[inline]
     fn from(s: &'a str) -> String {
         s.to_owned()
     }