diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 32a2298817538..b1ce643e87cd8 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -952,6 +952,7 @@ impl str { /// /// The caller must ensure that `mid` is a valid byte offset from the start /// of the string and falls on the boundary of a UTF-8 code point. + #[inline] const unsafe fn split_at_unchecked(&self, mid: usize) -> (&str, &str) { let len = self.len(); let ptr = self.as_ptr();