rust/tests/ui/proc-macro/auxiliary/is-available.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
289 B
Rust
Raw Normal View History

2020-04-21 14:28:11 -05:00
// 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()
}