diff options
| author | bors <bors@rust-lang.org> | 2018-10-09 19:57:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-10-09 19:57:55 +0000 |
| commit | 96cafc53cfc6667a03c8e77d8e0a2fc96555ff6b (patch) | |
| tree | e4ca21e23facc7cf460eb461eaabdd939ad943c4 /src/liballoc/string.rs | |
| parent | 0e07c4281c343e9e15a0a8fca79538ad1a8eb513 (diff) | |
| parent | d24070bf8d58f40887b4b33f63c1c3d3df55c346 (diff) | |
| download | rust-96cafc53cfc6667a03c8e77d8e0a2fc96555ff6b.tar.gz rust-96cafc53cfc6667a03c8e77d8e0a2fc96555ff6b.zip | |
Auto merge of #54613 - matthiaskrgr:string_from_inline_53681, r=nagisa
liballoc: mark str.to_owned() and String::from(&str) as #[inline]. Fixes #53681
Diffstat (limited to 'src/liballoc/string.rs')
| -rw-r--r-- | src/liballoc/string.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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() } |
