blob: 2bb5376076e28f56baa328385e696a3ab1bd6467 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// aux-build:macros.rs
#![allow(unused)]
extern crate macros;
use serde::Serialize;
fn main() {
println!("one");
println!("two");
cfg!(unix);
vec![1, 2, 3];
#[derive(Serialize)]
struct Derive;
let _ = macros::expr!();
macros::stmt!();
let macros::pat!() = 1;
let _: macros::ty!() = "";
macros::item!();
eprintln!("allowed");
}
struct S;
impl S {
macros::item!();
}
trait Y {
macros::item!();
}
impl Y for S {
macros::item!();
}
|