mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
17 lines
319 B
Rust
17 lines
319 B
Rust
// force-host
|
|
// no-prefer-dynamic
|
|
|
|
#![feature(proc_macro_quote)]
|
|
#![crate_type = "proc-macro"]
|
|
|
|
extern crate proc_macro;
|
|
use proc_macro::*;
|
|
|
|
#[proc_macro]
|
|
pub fn dollar_ident(input: TokenStream) -> TokenStream {
|
|
let black_hole = input.into_iter().next().unwrap();
|
|
quote! {
|
|
$black_hole!($$var);
|
|
}
|
|
}
|