mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 01:42:54 +03:00
liballoc: mark str.to_owned() and String::from(&str) as #[inline].
Fixes #53681
This commit is contained in:
@@ -2196,6 +2196,7 @@ fn as_ref(&self) -> &[u8] {
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a> From<&'a str> for String {
|
||||
#[inline]
|
||||
fn from(s: &'a str) -> String {
|
||||
s.to_owned()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user