about summary refs log tree commit diff
path: root/tests/mir-opt/pre-codegen
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-11-07 18:48:21 -0800
committerGitHub <noreply@github.com>2024-11-07 18:48:21 -0800
commit93e9ec05a9c2eeea41dbbc5f52954ff0d0b87de1 (patch)
tree458bb3869efc7a8463406fbb72819fab9ec7338c /tests/mir-opt/pre-codegen
parent60e8ab6ba8d005ff83d6e2e33e679375af5f74ec (diff)
parent0d5cc8ee96c0bf7fa041727891839da4ac57c042 (diff)
downloadrust-93e9ec05a9c2eeea41dbbc5f52954ff0d0b87de1.tar.gz
rust-93e9ec05a9c2eeea41dbbc5f52954ff0d0b87de1.zip
Rollup merge of #131913 - jieyouxu:only_debug_assertions, r=onur-ozkan
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support

Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing.

cc ````@matthiaskrgr````

Closes #123987.

r? bootstrap (or compiler tbh)
Diffstat (limited to 'tests/mir-opt/pre-codegen')
-rw-r--r--tests/mir-opt/pre-codegen/mem_replace.rs3
-rw-r--r--tests/mir-opt/pre-codegen/ptr_offset.rs2
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.rs2
3 files changed, 4 insertions, 3 deletions
diff --git a/tests/mir-opt/pre-codegen/mem_replace.rs b/tests/mir-opt/pre-codegen/mem_replace.rs
index a68fe31f609..be23dcdb22a 100644
--- a/tests/mir-opt/pre-codegen/mem_replace.rs
+++ b/tests/mir-opt/pre-codegen/mem_replace.rs
@@ -1,6 +1,7 @@
 // skip-filecheck
 //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir
-//@ ignore-debug: precondition checks on ptr::read/write are under cfg(debug_assertions)
+//@ ignore-std-debug-assertions
+// Reason: precondition checks on ptr::read/write are under cfg(debug_assertions)
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 #![crate_type = "lib"]
diff --git a/tests/mir-opt/pre-codegen/ptr_offset.rs b/tests/mir-opt/pre-codegen/ptr_offset.rs
index 88ee00296a0..120be99fc94 100644
--- a/tests/mir-opt/pre-codegen/ptr_offset.rs
+++ b/tests/mir-opt/pre-codegen/ptr_offset.rs
@@ -1,6 +1,6 @@
 // skip-filecheck
 //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir
-//@ ignore-debug: precondition checks are under cfg(debug_assertions)
+//@ ignore-std-debug-assertions (precondition checks are under cfg(debug_assertions))
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 #![crate_type = "lib"]
diff --git a/tests/mir-opt/pre-codegen/slice_iter.rs b/tests/mir-opt/pre-codegen/slice_iter.rs
index fee4214982d..46ded729852 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.rs
+++ b/tests/mir-opt/pre-codegen/slice_iter.rs
@@ -1,7 +1,7 @@
 // skip-filecheck
 //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 //@ only-64bit (constants for `None::<&T>` show in the output)
-//@ ignore-debug: precondition checks on ptr::add are under cfg(debug_assertions)
+//@ ignore-std-debug-assertions (precondition checks on ptr::add are under cfg(debug_assertions))
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 #![crate_type = "lib"]