tests: Add ui/attributes/unix_sigpipe/unix_sigpipe-str-list.rs
Which is a variant of [`unix_sigpipe-list.rs`][1] but where a string is used instead of an identifier. This makes it more similar to the proper form `#[unix_sigpipe = "sig_dfl"]` and thus more likely to be written by users by mistake. Also rename the first test to be more in line with the terminology of [The Reference][2]. [1]: https://github.com/rust-lang/rust/blob/master/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.rs [2]: https://doc.rust-lang.org/reference/attributes.html#meta-item-attribute-syntax
This commit is contained in:
parent
5aad51d015
commit
98553ce27e
@ -1,5 +1,5 @@
|
|||||||
error: malformed `unix_sigpipe` attribute input
|
error: malformed `unix_sigpipe` attribute input
|
||||||
--> $DIR/unix_sigpipe-list.rs:3:1
|
--> $DIR/unix_sigpipe-ident-list.rs:3:1
|
||||||
|
|
|
|
||||||
LL | #[unix_sigpipe(sig_dfl)]
|
LL | #[unix_sigpipe(sig_dfl)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[unix_sigpipe = "inherit|sig_ign|sig_dfl"]`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[unix_sigpipe = "inherit|sig_ign|sig_dfl"]`
|
@ -0,0 +1,4 @@
|
|||||||
|
#![feature(unix_sigpipe)]
|
||||||
|
|
||||||
|
#[unix_sigpipe("sig_dfl")] //~ error: malformed `unix_sigpipe` attribute input
|
||||||
|
fn main() {}
|
@ -0,0 +1,8 @@
|
|||||||
|
error: malformed `unix_sigpipe` attribute input
|
||||||
|
--> $DIR/unix_sigpipe-str-list.rs:3:1
|
||||||
|
|
|
||||||
|
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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user