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"]
This commit is contained in:
Martin Nordholts 2024-02-09 07:57:27 +01:00
parent d14f15862d
commit 948b1d68ab
4 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,5 @@
#![feature(unix_sigpipe)]
#[unix_sigpipe = "sig_ign"]
#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes
fn main() {}

View File

@ -0,0 +1,14 @@
error: multiple `unix_sigpipe` attributes
--> $DIR/unix_sigpipe-different-duplicates.rs:4:1
|
LL | #[unix_sigpipe = "inherit"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
note: attribute also specified here
--> $DIR/unix_sigpipe-different-duplicates.rs:3:1
|
LL | #[unix_sigpipe = "sig_ign"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error

View File

@ -1,5 +1,5 @@
#![feature(unix_sigpipe)]
#[unix_sigpipe = "sig_ign"]
#[unix_sigpipe = "inherit"]
#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes
fn main() {}

View File

@ -7,7 +7,7 @@ LL | #[unix_sigpipe = "inherit"]
note: attribute also specified here
--> $DIR/unix_sigpipe-duplicates.rs:3:1
|
LL | #[unix_sigpipe = "sig_ign"]
LL | #[unix_sigpipe = "inherit"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error