rust/tests/ui/attributes/unsafe/derive-unsafe-attributes.rs
2024-07-29 21:00:09 -05:00

10 lines
224 B
Rust

#![feature(unsafe_attributes)]
#[derive(unsafe(Debug))] //~ ERROR: traits in `#[derive(...)]` don't accept `unsafe(...)`
struct Foo;
#[unsafe(derive(Debug))] //~ ERROR: is not an unsafe attribute
struct Bar;
fn main() {}