rust/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.rs
Florian Warzecha 7258740509
validate allow_internal_unstable target
Adds a check to make sure `#[allow_internal_unstable]`
can be applied only to macro definitions.
2020-10-21 22:49:08 +02:00

9 lines
253 B
Rust

// checks that this attribute is caught on non-macro items.
// this needs a different test since this is done after expansion
#[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps
//~| ERROR attribute should
struct S;
fn main() {}