Skip to content

Commit c0f9a39

Browse files
committed
Mark slice_error_fail as a cold path
1 parent eb19d02 commit c0f9a39

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/str/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,7 @@ pub trait StrExt {
14411441
}
14421442

14431443
#[inline(never)]
1444+
#[cold]
14441445
fn slice_error_fail(s: &str, begin: usize, end: usize) -> ! {
14451446
assert!(begin <= end);
14461447
panic!("index {} and/or {} in `{}` do not lie on character boundary",

0 commit comments

Comments
 (0)