Skip to content

Commit ec51268

Browse files
authored
Unrolled build for rust-lang#122363
Rollup merge of rust-lang#122363 - Enselic:unix_sigpipe-str-list, r=oli-obk 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. Having a test for this case gives peace of mind. 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 Tracking issue: rust-lang#97889
2 parents 7de1a1f + 98553ce commit ec51268

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr renamed to tests/ui/attributes/unix_sigpipe/unix_sigpipe-ident-list.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: malformed `unix_sigpipe` attribute input
2-
--> $DIR/unix_sigpipe-list.rs:3:1
2+
--> $DIR/unix_sigpipe-ident-list.rs:3:1
33
|
44
LL | #[unix_sigpipe(sig_dfl)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[unix_sigpipe = "inherit|sig_ign|sig_dfl"]`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#![feature(unix_sigpipe)]
2+
3+
#[unix_sigpipe("sig_dfl")] //~ error: malformed `unix_sigpipe` attribute input
4+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: malformed `unix_sigpipe` attribute input
2+
--> $DIR/unix_sigpipe-str-list.rs:3:1
3+
|
4+
LL | #[unix_sigpipe("sig_dfl")]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[unix_sigpipe = "inherit|sig_ign|sig_dfl"]`
6+
7+
error: aborting due to 1 previous error
8+

0 commit comments

Comments
 (0)