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

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

16 lines
295 B
Rust
Raw Normal View History

2020-04-21 14:28:11 -05:00
//@ run-pass
extern crate proc_macro;
//@ aux-build:is-available.rs
extern crate is_available;
fn main() {
let a = proc_macro::is_available();
let b = is_available::from_inside_proc_macro!();
let c = proc_macro::is_available();
assert!(!a);
assert!(b);
assert!(!c);
}