summaryrefslogtreecommitdiffstats
path: root/src/test/ui/proc-macro/auxiliary/issue-59191.rs
blob: d9ee77067ecb7d713bdbc4e242b40fb3b996533e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// edition:2018
// force-host
// no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn no_main(_attrs: TokenStream, _input: TokenStream) -> TokenStream {
    let new_krate = r#"
        fn main() {}
    "#;
    new_krate.parse().unwrap()
}