about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make-cargo/panic-immediate-abort-codegen/rmake.rs5
-rw-r--r--tests/run-make-cargo/panic-immediate-abort-works/rmake.rs6
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/run-make-cargo/panic-immediate-abort-codegen/rmake.rs b/tests/run-make-cargo/panic-immediate-abort-codegen/rmake.rs
index e91d1db83d1..d7a7a8bfd8c 100644
--- a/tests/run-make-cargo/panic-immediate-abort-codegen/rmake.rs
+++ b/tests/run-make-cargo/panic-immediate-abort-codegen/rmake.rs
@@ -1,3 +1,8 @@
+// This is a codegen test which checks that when code is compiled with panic=immediate-abort,
+// we get a `tail call void @llvm.trap()` in user code instead of a call into the standard
+// library's panic formatting code (such as panic_fmt) or one of the numerous panic outlining shims
+// (such as slice_index_fail).
+
 #![deny(warnings)]
 
 use run_make_support::{cargo, llvm_filecheck, path, rfs, target};
diff --git a/tests/run-make-cargo/panic-immediate-abort-works/rmake.rs b/tests/run-make-cargo/panic-immediate-abort-works/rmake.rs
index a3c5877a6a1..bb15bd41e79 100644
--- a/tests/run-make-cargo/panic-immediate-abort-works/rmake.rs
+++ b/tests/run-make-cargo/panic-immediate-abort-works/rmake.rs
@@ -1,3 +1,9 @@
+// This test ensures we are able to compile and link a simple binary with panic=immediate-abort.
+// The test panic-immediate-abort-codegen checks that panic strategy produces the desired codegen,
+// but is based on compiling a library crate (which is the norm for codegen tests because it is
+// cleaner and more portable). So this test ensures that we didn't mix up a cfg or a compiler
+// implementation detail in a way that makes panic=immediate-abort encounter errors at link time.
+
 //@ needs-target-std
 
 #![deny(warnings)]