Skip to content

Commit 3e9d356

Browse files
committed
Test that cfg_if from prelude can be overriden
1 parent c0aabcf commit 3e9d356

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/libcore/tests/cfg_if_override.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#![feature(cfg_if)]
2+
3+
macro_rules! cfg_if {
4+
(()) => {
5+
mod foo {
6+
fn foo() {}
7+
}
8+
}
9+
}
10+
11+
cfg_if!{}
12+
13+
#[test]
14+
fn it_works() {
15+
foo::foo();
16+
}

0 commit comments

Comments
 (0)