Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unix_sigpipe: Replace inherit with sig_dfl in syntax tests #122328

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(unix_sigpipe)]
#![unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute cannot be used at crate level
#![unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute cannot be used at crate level

fn main() {}
6 changes: 3 additions & 3 deletions tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error: `unix_sigpipe` attribute cannot be used at crate level
--> $DIR/unix_sigpipe-crate.rs:2:1
|
LL | #![unix_sigpipe = "inherit"]
LL | #![unix_sigpipe = "sig_dfl"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | fn main() {}
| ---- the inner attribute doesn't annotate this function
|
help: perhaps you meant to use an outer attribute
|
LL - #![unix_sigpipe = "inherit"]
LL + #[unix_sigpipe = "inherit"]
LL - #![unix_sigpipe = "sig_dfl"]
LL + #[unix_sigpipe = "sig_dfl"]
|

error: aborting due to 1 previous error
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(unix_sigpipe)]

#[unix_sigpipe(inherit)] //~ error: malformed `unix_sigpipe` attribute input
#[unix_sigpipe(sig_dfl)] //~ error: malformed `unix_sigpipe` attribute input
fn main() {}
2 changes: 1 addition & 1 deletion tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: malformed `unix_sigpipe` attribute input
--> $DIR/unix_sigpipe-list.rs:3:1
|
LL | #[unix_sigpipe(inherit)]
LL | #[unix_sigpipe(sig_dfl)]
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[unix_sigpipe = "inherit|sig_ign|sig_dfl"]`

error: aborting due to 1 previous error
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![feature(unix_sigpipe)]

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

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: `unix_sigpipe` attribute can only be used on `fn main()`
--> $DIR/unix_sigpipe-non-main-fn.rs:3:1
|
LL | #[unix_sigpipe = "inherit"]
LL | #[unix_sigpipe = "sig_dfl"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![feature(unix_sigpipe)]

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

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

error: aborting due to 1 previous error
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
#![feature(unix_sigpipe)]

#[start]
#[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
#[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
fn custom_start(argc: isize, argv: *const *const u8) -> isize { 0 }
2 changes: 1 addition & 1 deletion tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: `unix_sigpipe` attribute can only be used on `fn main()`
--> $DIR/unix_sigpipe-start.rs:5:1
|
LL | #[unix_sigpipe = "inherit"]
LL | #[unix_sigpipe = "sig_dfl"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![feature(unix_sigpipe)]

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

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: `unix_sigpipe` attribute can only be used on `fn main()`
--> $DIR/unix_sigpipe-struct.rs:3:1
|
LL | #[unix_sigpipe = "inherit"]
LL | #[unix_sigpipe = "sig_dfl"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
Expand Down
Loading