Mark slice_error_fail as a cold path
This commit is contained in:
parent
eb19d024a9
commit
c0f9a39e5c
@ -1441,6 +1441,7 @@ pub trait StrExt {
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
#[cold]
|
||||
fn slice_error_fail(s: &str, begin: usize, end: usize) -> ! {
|
||||
assert!(begin <= end);
|
||||
panic!("index {} and/or {} in `{}` do not lie on character boundary",
|
||||
|
Loading…
x
Reference in New Issue
Block a user