rust/tests/ui/proc-macro/auxiliary/is-available.rs
2024-02-16 20:02:50 +00:00

14 lines
291 B
Rust

//@ force-host
//@ no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::{Literal, TokenStream, TokenTree};
#[proc_macro]
pub fn from_inside_proc_macro(_input: TokenStream) -> TokenStream {
proc_macro::is_available().to_string().parse().unwrap()
}