rust/tests/ui/attributes/unsafe/derive-unsafe-attributes.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
224 B
Rust
Raw Normal View History

2024-04-23 12:50:53 +00:00
#![feature(unsafe_attributes)]
#[derive(unsafe(Debug))] //~ ERROR: traits in `#[derive(...)]` don't accept `unsafe(...)`
struct Foo;
2024-07-03 04:52:16 +00:00
#[unsafe(derive(Debug))] //~ ERROR: is not an unsafe attribute
struct Bar;
2024-04-23 12:50:53 +00:00
fn main() {}