Skip to content

Commit aea60b0

Browse files
committed
unix_sigpipe: Replace inherit with sig_dfl in syntax tests
The `sig_dfl` variant of the attribute is the most likely variant to be stabilized first, and thus to become the "most allowed" variant of the attribute. Because of this, it is the most appropriate variant to use in syntax tests, because even if the most allowed variant is used, the compiler shall still emit errors if it e.g. is used in the wrong places.
1 parent c69fda7 commit aea60b0

12 files changed

+14
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#![feature(unix_sigpipe)]
2-
#![unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute cannot be used at crate level
2+
#![unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute cannot be used at crate level
33

44
fn main() {}

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error: `unix_sigpipe` attribute cannot be used at crate level
22
--> $DIR/unix_sigpipe-crate.rs:2:1
33
|
4-
LL | #![unix_sigpipe = "inherit"]
4+
LL | #![unix_sigpipe = "sig_dfl"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
LL |
77
LL | fn main() {}
88
| ---- the inner attribute doesn't annotate this function
99
|
1010
help: perhaps you meant to use an outer attribute
1111
|
12-
LL - #![unix_sigpipe = "inherit"]
13-
LL + #[unix_sigpipe = "inherit"]
12+
LL - #![unix_sigpipe = "sig_dfl"]
13+
LL + #[unix_sigpipe = "sig_dfl"]
1414
|
1515

1616
error: aborting due to 1 previous error
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#![feature(unix_sigpipe)]
22

3-
#[unix_sigpipe(inherit)] //~ error: malformed `unix_sigpipe` attribute input
3+
#[unix_sigpipe(sig_dfl)] //~ error: malformed `unix_sigpipe` attribute input
44
fn main() {}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: malformed `unix_sigpipe` attribute input
22
--> $DIR/unix_sigpipe-list.rs:3:1
33
|
4-
LL | #[unix_sigpipe(inherit)]
4+
LL | #[unix_sigpipe(sig_dfl)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[unix_sigpipe = "inherit|sig_ign|sig_dfl"]`
66

77
error: aborting due to 1 previous error
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(unix_sigpipe)]
22

3-
#[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
3+
#[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
44
fn f() {}
55

66
fn main() {}

tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: `unix_sigpipe` attribute can only be used on `fn main()`
22
--> $DIR/unix_sigpipe-non-main-fn.rs:3:1
33
|
4-
LL | #[unix_sigpipe = "inherit"]
4+
LL | #[unix_sigpipe = "sig_dfl"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error

tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(unix_sigpipe)]
22

33
mod m {
4-
#[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on root `fn main()`
4+
#[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on root `fn main()`
55
fn main() {}
66
}
77

tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: `unix_sigpipe` attribute can only be used on root `fn main()`
22
--> $DIR/unix_sigpipe-non-root-main.rs:4:5
33
|
4-
LL | #[unix_sigpipe = "inherit"]
4+
LL | #[unix_sigpipe = "sig_dfl"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error

tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
#![feature(unix_sigpipe)]
33

44
#[start]
5-
#[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
5+
#[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
66
fn custom_start(argc: isize, argv: *const *const u8) -> isize { 0 }

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: `unix_sigpipe` attribute can only be used on `fn main()`
22
--> $DIR/unix_sigpipe-start.rs:5:1
33
|
4-
LL | #[unix_sigpipe = "inherit"]
4+
LL | #[unix_sigpipe = "sig_dfl"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(unix_sigpipe)]
22

3-
#[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
3+
#[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
44
struct S;
55

66
fn main() {}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: `unix_sigpipe` attribute can only be used on `fn main()`
22
--> $DIR/unix_sigpipe-struct.rs:3:1
33
|
4-
LL | #[unix_sigpipe = "inherit"]
4+
LL | #[unix_sigpipe = "sig_dfl"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error

0 commit comments

Comments
 (0)