]> git.proxmox.com Git - rustc.git/blob - src/test/ui/proc-macro/attribute-after-derive-feature-gate.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / proc-macro / attribute-after-derive-feature-gate.rs
1 // gate-test-macro_attributes_in_derive_output
2 // aux-build: test-macros.rs
3
4 #![feature(proc_macro_hygiene)]
5 #![feature(stmt_expr_attributes)]
6
7 #[macro_use]
8 extern crate test_macros;
9
10 #[derive(Empty)]
11 #[empty_attr] //~ ERROR macro attributes in `#[derive]` output are unstable
12 struct S1 {
13 field: [u8; 10],
14 }
15
16 #[derive(Empty)]
17 #[empty_helper]
18 #[empty_attr] //~ ERROR macro attributes in `#[derive]` output are unstable
19 struct S2 {
20 field: [u8; 10],
21 }
22
23 #[derive(Empty)]
24 struct S3 {
25 field: [u8; #[identity_attr] 10], //~ ERROR macro attributes in `#[derive]` output are unstable
26 }
27
28 #[derive(Empty)]
29 struct S4 {
30 field: [u8; {
31 #[derive(Empty)] // OK, not gated
32 struct Inner;
33 10
34 }]
35 }
36
37 fn main() {}