Skip to content

Commit 948b1d6

Browse files
committed
tests: Add unix_sigpipe-different-duplicates.rs test variant
To make sure that #[unix_sigpipe = "x"] #[unix_sigpipe = "y"] behaves like #[unix_sigpipe = "x"] #[unix_sigpipe = "x"]
1 parent d14f158 commit 948b1d6

4 files changed

+21
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#![feature(unix_sigpipe)]
2+
3+
#[unix_sigpipe = "sig_ign"]
4+
#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes
5+
fn main() {}
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 = "inherit"]
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_ign"]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to 1 previous error
14+
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(unix_sigpipe)]
22

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | #[unix_sigpipe = "inherit"]
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 = "inherit"]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error: aborting due to 1 previous error

0 commit comments

Comments
 (0)