diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs index 4918e37eb35f0..5a007285e4873 100644 --- a/src/libcore/str/pattern.rs +++ b/src/libcore/str/pattern.rs @@ -618,7 +618,10 @@ impl<'a, 'b> StrSearcher<'a, 'b> { } unsafe impl<'a, 'b> Searcher<'a> for StrSearcher<'a, 'b> { - fn haystack(&self) -> &'a str { self.haystack } + #[inline] + fn haystack(&self) -> &'a str { + self.haystack + } #[inline] fn next(&mut self) -> SearchStep {