49db8a5a99
This makes it possible for the `unsafe(...)` syntax to only be valid at the top level, and the `NestedMetaItem`s will automatically reject `unsafe(...)`.
14 lines
195 B
Rust
14 lines
195 B
Rust
//@ build-pass
|
|
#![feature(unsafe_attributes)]
|
|
|
|
#[unsafe(no_mangle)]
|
|
fn a() {}
|
|
|
|
#[unsafe(export_name = "foo")]
|
|
fn b() {}
|
|
|
|
#[cfg_attr(any(), unsafe(no_mangle))]
|
|
static VAR2: u32 = 1;
|
|
|
|
fn main() {}
|