mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-25 08:47:09 +00:00
16 lines
213 B
Rust
16 lines
213 B
Rust
extern crate proc_macro;
|
|
|
|
use proc_macro::TokenStream;
|
|
|
|
#[proc_macro]
|
|
pub fn matcher(input: TokenStream) -> TokenStream {
|
|
"
|
|
struct S(());
|
|
let s = S(());
|
|
match s {
|
|
true => {}
|
|
_ => {}
|
|
}
|
|
".parse().unwrap()
|
|
}
|