]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass-fulldeps/proc-macro/issue-42708.rs
7bbdbc6505db5d40bc2a46dd642306f4a8de3552
[rust.git] / src / test / run-pass-fulldeps / proc-macro / issue-42708.rs
1 // Copyright 2017 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:issue-42708.rs
12 // ignore-stage1
13
14 #![feature(decl_macro)]
15 #![allow(unused)]
16
17 extern crate issue_42708;
18
19 macro m() {
20     #[derive(issue_42708::Test)]
21     struct S { x: () }
22
23     #[issue_42708::attr_test]
24     struct S2 { x: () }
25
26     #[derive(Clone)]
27     struct S3 { x: () }
28
29     fn g(s: S, s2: S2, s3: S3) {
30         (s.x, s2.x, s3.x);
31     }
32 }
33
34 m!();
35
36 fn main() {}