Skip to content

Commit

Permalink
tests: Add unix_sigpipe-different-duplicates.rs test variant
Browse files Browse the repository at this point in the history
To make sure that

    #[unix_sigpipe = "x"]
    #[unix_sigpipe = "y"]

behaves like

    #[unix_sigpipe = "x"]
    #[unix_sigpipe = "x"]
  • Loading branch information
Enselic committed Feb 23, 2024
1 parent d14f158 commit 948b1d6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#![feature(unix_sigpipe)]

#[unix_sigpipe = "sig_ign"]
#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes
fn main() {}
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unix_sigpipe)]

#[unix_sigpipe = "sig_ign"]
#[unix_sigpipe = "inherit"]
#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes
fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 948b1d6

Please sign in to comment.