diff options
Diffstat (limited to 'tests/ui/proc-macro/auxiliary/is-available.rs')
-rw-r--r-- | tests/ui/proc-macro/auxiliary/is-available.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/auxiliary/is-available.rs b/tests/ui/proc-macro/auxiliary/is-available.rs new file mode 100644 index 000000000..03f5265e3 --- /dev/null +++ b/tests/ui/proc-macro/auxiliary/is-available.rs @@ -0,0 +1,13 @@ +// 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() +} |