2 // ignore-debug: the debug assertions get in the way
6 // Make sure that `Vec::shrink_to_fit` never emits panics via `RawVec::shrink_to_fit`,
7 // "Tried to shrink to a larger capacity", because the length is *always* <= capacity.
9 // CHECK-LABEL: @shrink_to_fit
11 pub fn shrink_to_fit(vec: &mut Vec<u32>) {
16 // CHECK-LABEL: @issue71861
18 pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
21 // Call to panic_no_unwind in case of double-panic is expected,
22 // but other panics are not.
24 // CHECK-NEXT: ; call core::panicking::panic_no_unwind
25 // CHECK-NEXT: panic_no_unwind
28 vec.into_boxed_slice()
31 // CHECK-LABEL: @issue75636
33 pub fn issue75636<'a>(iter: &[&'a str]) -> Box<[&'a str]> {
36 // Call to panic_no_unwind in case of double-panic is expected,
37 // but other panics are not.
39 // CHECK-NEXT: ; call core::panicking::panic_no_unwind
40 // CHECK-NEXT: panic_no_unwind
43 iter.iter().copied().collect()
46 // CHECK: ; core::panicking::panic_no_unwind
47 // CHECK: declare void @{{.*}}panic_no_unwind