Make const_eval_select a real intrinsic
This commit is contained in:
@@ -91,10 +91,12 @@ const fn slice_error_fail(s: &str, begin: usize, end: usize) -> ! {
|
||||
}
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
const fn slice_error_fail_ct(_: &str, _: usize, _: usize) -> ! {
|
||||
panic!("failed to slice string");
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
fn slice_error_fail_rt(s: &str, begin: usize, end: usize) -> ! {
|
||||
const MAX_DISPLAY_LENGTH: usize = 256;
|
||||
let trunc_len = s.floor_char_boundary(MAX_DISPLAY_LENGTH);
|
||||
|
||||
Reference in New Issue
Block a user