about summary refs log tree commit diff
path: root/tests/run-coverage/sort_groups.rs
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-10-26 21:34:49 +1100
committerZalathar <Zalathar@users.noreply.github.com>2023-11-07 11:15:18 +1100
commit7f8a6de72c1ddf25775da648dc42198847ca0a23 (patch)
tree9f61261774adacd6df3aa8c70fcb4d0fb1dd6ee3 /tests/run-coverage/sort_groups.rs
parent189d6c71f3bb6c52113b5639a80839791974fd22 (diff)
downloadrust-7f8a6de72c1ddf25775da648dc42198847ca0a23.tar.gz
rust-7f8a6de72c1ddf25775da648dc42198847ca0a23.zip
coverage: Use `-Copt-level=2` by default in run-coverage tests
This is a step towards being able to unify the two coverage test directories.

There are two tests that require adjustment:

- `overflow.rs` requires an explicit `-Coverflow-checks=yes`
- `sort_groups.rs` is sensitive to provably unused instantiations
Diffstat (limited to 'tests/run-coverage/sort_groups.rs')
-rw-r--r--tests/run-coverage/sort_groups.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/run-coverage/sort_groups.rs b/tests/run-coverage/sort_groups.rs
index f89f9f3ec61..5adbbc6a87d 100644
--- a/tests/run-coverage/sort_groups.rs
+++ b/tests/run-coverage/sort_groups.rs
@@ -7,7 +7,7 @@ fn main() {
     let cond = std::env::args().len() > 1;
     generic_fn::<()>(cond);
     generic_fn::<&'static str>(!cond);
-    if false {
+    if std::hint::black_box(false) {
         generic_fn::<char>(cond);
     }
     generic_fn::<i32>(cond);