about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.rs5
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.stderr14
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.rs2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr2
4 files changed, 21 insertions, 2 deletions
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.rs
new file mode 100644
index 00000000000..294cb38526b
--- /dev/null
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.rs
@@ -0,0 +1,5 @@
+#![feature(unix_sigpipe)]
+
+#[unix_sigpipe = "sig_ign"]
+#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes
+fn main() {}
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.stderr
new file mode 100644
index 00000000000..c2a3b9f45f9
--- /dev/null
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.stderr
@@ -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
+
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.rs
index 294cb38526b..eccb23021b6 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.rs
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.rs
@@ -1,5 +1,5 @@
 #![feature(unix_sigpipe)]
 
-#[unix_sigpipe = "sig_ign"]
+#[unix_sigpipe = "inherit"]
 #[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes
 fn main() {}
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr
index 931aae96b0f..c86e54a1e53 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr
@@ -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