about summary refs log tree commit diff
path: root/tests/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/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/codegen')
-rw-r--r--tests/codegen/binary-heap-peek-mut-pop-no-panic.rs2
-rw-r--r--tests/codegen/mem-replace-big-type.rs3
-rw-r--r--tests/codegen/mem-replace-simple-type.rs3
-rw-r--r--tests/codegen/slice-reverse.rs2
-rw-r--r--tests/codegen/vec-in-place.rs2
-rw-r--r--tests/codegen/vec-shrink-panik.rs2
-rw-r--r--tests/codegen/vec-with-capacity.rs2
-rw-r--r--tests/codegen/vecdeque-drain.rs2
-rw-r--r--tests/codegen/vecdeque_no_panic.rs2
9 files changed, 11 insertions, 9 deletions
diff --git a/tests/codegen/binary-heap-peek-mut-pop-no-panic.rs b/tests/codegen/binary-heap-peek-mut-pop-no-panic.rs
index 9cf4f210e52..e3bc9a4761c 100644
--- a/tests/codegen/binary-heap-peek-mut-pop-no-panic.rs
+++ b/tests/codegen/binary-heap-peek-mut-pop-no-panic.rs
@@ -1,5 +1,5 @@
 //@ compile-flags: -O
-//@ ignore-debug
+//@ ignore-std-debug-assertions
 #![crate_type = "lib"]
 
 use std::collections::binary_heap::PeekMut;
diff --git a/tests/codegen/mem-replace-big-type.rs b/tests/codegen/mem-replace-big-type.rs
index e62f1a953df..e62adfa0ba6 100644
--- a/tests/codegen/mem-replace-big-type.rs
+++ b/tests/codegen/mem-replace-big-type.rs
@@ -4,7 +4,8 @@
 // known to be `1` after inlining).
 
 //@ compile-flags: -C no-prepopulate-passes -Zinline-mir=no
-//@ ignore-debug: precondition checks in ptr::read make them a bad candidate for MIR inlining
+//@ ignore-std-debug-assertions
+// Reason: precondition checks in ptr::read make them a bad candidate for MIR inlining
 //@ needs-deterministic-layouts
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/mem-replace-simple-type.rs b/tests/codegen/mem-replace-simple-type.rs
index 7209fa21925..41c3660dc15 100644
--- a/tests/codegen/mem-replace-simple-type.rs
+++ b/tests/codegen/mem-replace-simple-type.rs
@@ -1,6 +1,7 @@
 //@ compile-flags: -O -C no-prepopulate-passes
 //@ only-x86_64 (to not worry about usize differing)
-//@ ignore-debug: precondition checks make mem::replace not a candidate for MIR inlining
+//@ ignore-std-debug-assertions
+// Reason: precondition checks make mem::replace not a candidate for MIR inlining
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/slice-reverse.rs b/tests/codegen/slice-reverse.rs
index 21add929f05..87cdad47962 100644
--- a/tests/codegen/slice-reverse.rs
+++ b/tests/codegen/slice-reverse.rs
@@ -1,6 +1,6 @@
 //@ compile-flags: -O
 //@ only-x86_64
-//@ ignore-debug: debug assertions prevent generating shufflevector
+//@ ignore-std-debug-assertions (debug assertions prevent generating shufflevector)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/vec-in-place.rs b/tests/codegen/vec-in-place.rs
index c6b77363a4e..5d05f242617 100644
--- a/tests/codegen/vec-in-place.rs
+++ b/tests/codegen/vec-in-place.rs
@@ -1,4 +1,4 @@
-//@ ignore-debug: FIXME: checks for call detect scoped noalias metadata
+//@ ignore-std-debug-assertions (FIXME: checks for call detect scoped noalias metadata)
 //@ compile-flags: -O -Z merge-functions=disabled
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/vec-shrink-panik.rs b/tests/codegen/vec-shrink-panik.rs
index 4b798fe6c9c..873904c2569 100644
--- a/tests/codegen/vec-shrink-panik.rs
+++ b/tests/codegen/vec-shrink-panik.rs
@@ -1,7 +1,7 @@
 // LLVM 17 realizes double panic is not possible and doesn't generate calls
 // to panic_cannot_unwind.
 //@ compile-flags: -O
-//@ ignore-debug: plain old debug assertions
+//@ ignore-std-debug-assertions (plain old debug assertions)
 //@ needs-unwind
 #![crate_type = "lib"]
 #![feature(shrink_to)]
diff --git a/tests/codegen/vec-with-capacity.rs b/tests/codegen/vec-with-capacity.rs
index 47051f2eef8..e8c5bc88bd0 100644
--- a/tests/codegen/vec-with-capacity.rs
+++ b/tests/codegen/vec-with-capacity.rs
@@ -1,5 +1,5 @@
 //@ compile-flags: -O
-//@ ignore-debug
+//@ ignore-std-debug-assertions
 // (with debug assertions turned on, `assert_unchecked` generates a real assertion)
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/vecdeque-drain.rs b/tests/codegen/vecdeque-drain.rs
index fca1ed367e6..8a34ba0674b 100644
--- a/tests/codegen/vecdeque-drain.rs
+++ b/tests/codegen/vecdeque-drain.rs
@@ -2,7 +2,7 @@
 
 //@ compile-flags: -O
 //@ needs-deterministic-layouts
-//@ ignore-debug: FIXME: checks for call detect scoped noalias metadata
+//@ ignore-std-debug-assertions (FIXME: checks for call detect scoped noalias metadata)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/vecdeque_no_panic.rs b/tests/codegen/vecdeque_no_panic.rs
index be2c4810ebc..da948d12254 100644
--- a/tests/codegen/vecdeque_no_panic.rs
+++ b/tests/codegen/vecdeque_no_panic.rs
@@ -1,7 +1,7 @@
 // This test checks that `VecDeque::front[_mut]()` and `VecDeque::back[_mut]()` can't panic.
 
 //@ compile-flags: -O
-//@ ignore-debug: plain old debug assertions
+//@ ignore-std-debug-assertions (plain old debug assertions)
 
 #![crate_type = "lib"]