summary refs log tree commit diff
path: root/src/test/ui/proc-macro/is-available.rs
blob: 52f7e00d572801dc6a0a6e65af47c851826175f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass

#![feature(proc_macro_is_available)]

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);
}