about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2024-11-06 18:54:03 +0000
committerKornel <kornel@geekhood.net>2024-11-06 18:54:50 +0000
commit5a855654de7ffb09681002ba6685a4234ac0a392 (patch)
treec42ab94d0fc031dc499f1030deb8f2cfaae13a9e
parent116fc31c5c82b7767c87101164a1afa3faea97fd (diff)
downloadrust-5a855654de7ffb09681002ba6685a4234ac0a392.tar.gz
rust-5a855654de7ffb09681002ba6685a4234ac0a392.zip
Inline str::repeat
-rw-r--r--library/alloc/src/str.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
index 26c1ba2a5c4..6fee8d3fe33 100644
--- a/library/alloc/src/str.rs
+++ b/library/alloc/src/str.rs
@@ -531,6 +531,7 @@ impl str {
     #[rustc_allow_incoherent_impl]
     #[must_use]
     #[stable(feature = "repeat_str", since = "1.16.0")]
+    #[inline]
     pub fn repeat(&self, n: usize) -> String {
         unsafe { String::from_utf8_unchecked(self.as_bytes().repeat(n)) }
     }