summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/link-cfg/with-deps.rs
blob: 48b7828152eb964d9afa9c177a6ec22cc99356a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate dep;

fn main() {
    unsafe {
        let v = dep::my_function();
        if cfg!(foo) {
            assert_eq!(v, 1);
        } else if cfg!(bar) {
            assert_eq!(v, 2);
        } else {
            panic!("unknown");
        }
    }
}