]> git.proxmox.com Git - rustc.git/blob - tests/pretty/attr-derive.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / pretty / attr-derive.rs
1 // aux-build:derive-foo.rs
2 // pp-exact
3 // Testing that both the inner item and next outer item are
4 // preserved, and that the first outer item parsed in main is not
5 // accidentally carried over to each inner function
6
7 #[macro_use]
8 extern crate derive_foo;
9
10 #[derive(Foo)]
11 struct X;
12
13 #[derive(Foo)]
14 #[Bar]
15 struct Y;
16
17 #[derive(Foo)]
18 struct WithRef {
19 x: X,
20 #[Bar]
21 y: Y,
22 }
23
24 #[derive(Foo)]
25 enum Enum {
26
27 #[Bar]
28 Asdf,
29 Qwerty,
30 }
31
32 fn main() {}