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 @@ pub fn into_string(self: Box) -> String { #[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)) } }