liballoc: mark str.to_owned() and String::from(&str) as #[inline].

Fixes #53681
This commit is contained in:
Matthias Krüger 2018-08-29 12:30:54 +02:00
parent e999ebdb97
commit d24070bf8d
2 changed files with 2 additions and 0 deletions

View file

@ -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()
}