summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/auxiliary/builtin-attrs.rs
blob: 6edafae398515da904b1d00a33f991f0a44b8064 (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
// force-host
// no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::*;

#[proc_macro_attribute]
pub fn feature(_: TokenStream, input: TokenStream) -> TokenStream {
    input
}

#[proc_macro_attribute]
pub fn repr(_: TokenStream, input: TokenStream) -> TokenStream {
    input
}

#[proc_macro_attribute]
pub fn test(_: TokenStream, input: TokenStream) -> TokenStream {
    "struct Test;".parse().unwrap()
}

#[proc_macro_attribute]
pub fn bench(_: TokenStream, input: TokenStream) -> TokenStream {
    "struct Bench;".parse().unwrap()
}