rust/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.rs
Martin Nordholts aea60b0cc7 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.
2024-03-11 06:19:30 +01:00

7 lines
147 B
Rust

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