]> git.lizzy.rs Git - rust.git/blob - src/test/pretty/attr-derive.rs
tests: remove ignore-stage1 where possible in proc_macro tests.
[rust.git] / src / test / pretty / attr-derive.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // aux-build:derive-foo.rs
12 // pp-exact
13 // Testing that both the inner item and next outer item are
14 // preserved, and that the first outer item parsed in main is not
15 // accidentally carried over to each inner function
16
17 #[macro_use]
18 extern crate derive_foo;
19
20 #[derive(Foo)]
21 struct X;
22
23 #[derive(Foo)]
24 #[Bar]
25 struct Y;
26
27 #[derive(Foo)]
28 struct WithRef {
29     x: X,
30     #[Bar]
31     y: Y,
32 }
33
34 #[derive(Foo)]
35 enum Enum {
36
37     #[Bar]
38     Asdf,
39     Qwerty,
40 }
41
42 fn main() { }