]> git.lizzy.rs Git - rust.git/blobdiff - src/test/codegen/vec-shrink-panik.rs
Auto merge of #100117 - nicholasbishop:bishop-update-cc, r=Mark-Simulacrum
[rust.git] / src / test / codegen / vec-shrink-panik.rs
index 6b0ac78857a0ebcb42349f1340434b3ce1fe3fd9..18409014bdede3769de714f70f23edab682ac60d 100644 (file)
@@ -16,6 +16,14 @@ pub fn shrink_to_fit(vec: &mut Vec<u32>) {
 // CHECK-LABEL: @issue71861
 #[no_mangle]
 pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
+    // CHECK-NOT: panic
+
+    // Call to panic_no_unwind in case of double-panic is expected,
+    // but other panics are not.
+    // CHECK: cleanup
+    // CHECK-NEXT: ; call core::panicking::panic_no_unwind
+    // CHECK-NEXT: panic_no_unwind
+
     // CHECK-NOT: panic
     vec.into_boxed_slice()
 }
@@ -23,6 +31,17 @@ pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
 // CHECK-LABEL: @issue75636
 #[no_mangle]
 pub fn issue75636<'a>(iter: &[&'a str]) -> Box<[&'a str]> {
+    // CHECK-NOT: panic
+
+    // Call to panic_no_unwind in case of double-panic is expected,
+    // but other panics are not.
+    // CHECK: cleanup
+    // CHECK-NEXT: ; call core::panicking::panic_no_unwind
+    // CHECK-NEXT: panic_no_unwind
+
     // CHECK-NOT: panic
     iter.iter().copied().collect()
 }
+
+// CHECK: ; core::panicking::panic_no_unwind
+// CHECK: declare void @{{.*}}panic_no_unwind