std: fix the non-stage0 str::raw::slice_bytes which broke in a merge
This commit is contained in:
@@ -1051,7 +1051,7 @@ pub mod raw {
|
|||||||
/// If end is greater than the length of the string.
|
/// If end is greater than the length of the string.
|
||||||
#[cfg(not(stage0))]
|
#[cfg(not(stage0))]
|
||||||
#[inline]
|
#[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| {
|
do s.as_imm_buf |sbuf, n| {
|
||||||
assert!((begin <= end));
|
assert!((begin <= end));
|
||||||
assert!((end <= n));
|
assert!((end <= n));
|
||||||
|
|||||||
Reference in New Issue
Block a user