mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-05 06:27:38 +00:00
15 lines
259 B
Rust
15 lines
259 B
Rust
![]() |
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");
|
||
|
}
|
||
|
}
|
||
|
}
|