Skip to content

Commit 2079254

Browse files
committed
unix_sigpipe: Add unix_sigpipe-different-duplicates.rs test variant
And use the "sig_dfl" variant as much as possible since that is the "least wrong" of all the variants, especially considering that it will be the first variant to be stabilized.
1 parent 1692509 commit 2079254

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#![feature(unix_sigpipe)]
2+
3+
#[unix_sigpipe = "sig_dfl"]
4+
#[unix_sigpipe = "sig_ign"] //~ error: multiple `unix_sigpipe` attributes
5+
fn main() {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: multiple `unix_sigpipe` attributes
2+
--> $DIR/unix_sigpipe-different-duplicates.rs:4:1
3+
|
4+
LL | #[unix_sigpipe = "sig_ign"]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
6+
|
7+
note: attribute also specified here
8+
--> $DIR/unix_sigpipe-different-duplicates.rs:3:1
9+
|
10+
LL | #[unix_sigpipe = "sig_dfl"]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to 1 previous error
14+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(unix_sigpipe)]
22

3-
#[unix_sigpipe = "sig_ign"]
4-
#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes
3+
#[unix_sigpipe = "sig_dfl"]
4+
#[unix_sigpipe = "sig_dfl"] //~ error: multiple `unix_sigpipe` attributes
55
fn main() {}

tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: multiple `unix_sigpipe` attributes
22
--> $DIR/unix_sigpipe-duplicates.rs:4:1
33
|
4-
LL | #[unix_sigpipe = "inherit"]
4+
LL | #[unix_sigpipe = "sig_dfl"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
66
|
77
note: attribute also specified here
88
--> $DIR/unix_sigpipe-duplicates.rs:3:1
99
|
10-
LL | #[unix_sigpipe = "sig_ign"]
10+
LL | #[unix_sigpipe = "sig_dfl"]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error: aborting due to 1 previous error

0 commit comments

Comments
 (0)