diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 5c6895fea43c9..f1a44c4b38639 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -885,7 +885,7 @@ pub mod raw { /// If begin is greater than end. /// If end is greater than the length of the string. #[inline] - pub unsafe fn slice_bytes(s: &str, begin: uint, end: uint) -> &str { + pub unsafe fn slice_bytes<'a>(s: &'a str, begin: uint, end: uint) -> &'a str { do s.as_imm_buf |sbuf, n| { assert!((begin <= end)); assert!((end <= n));