about summary refs log tree commit diff
path: root/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs
diff options
context:
space:
mode:
authorMartin Nordholts <martin.nordholts@codetale.se>2024-02-09 08:47:47 +0100
committerMartin Nordholts <martin.nordholts@codetale.se>2024-02-23 22:03:09 +0100
commitd14f15862d2ac7111f70efe82882fb3575167a53 (patch)
tree7b8fb996958a25250f5f63eea93aacb50d7d5267 /tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs
parenta1cb3dba840fd56a7f9a0c90346a1fcddc641f9c (diff)
downloadrust-d14f15862d2ac7111f70efe82882fb3575167a53.tar.gz
rust-d14f15862d2ac7111f70efe82882fb3575167a53.zip
tests: Combine unix_sigpipe-not-used.rs and unix_sigpipe-only-feature.rs
The only difference between the files is the presence/absence of

    #![feature(unix_sigpipe)]

attribute. Avoid duplication by using revisions instead.
Diffstat (limited to 'tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs')
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs
index 778e06cb3ef..b0044f5e919 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs
@@ -1,6 +1,9 @@
+//@ revisions: with_feature without_feature
 //@ run-pass
 //@ aux-build:sigpipe-utils.rs
 
+#![cfg_attr(with_feature, feature(unix_sigpipe))]
+
 fn main() {
     extern crate sigpipe_utils;