2019-06-08 08:36:43 +00:00
|
|
|
#![feature(rustc_attrs)]
|
2015-02-14 10:45:43 +00:00
|
|
|
|
2015-01-02 22:44:21 +00:00
|
|
|
macro_rules! test { ($nm:ident,
|
2014-03-26 23:14:07 +00:00
|
|
|
#[$a:meta],
|
2015-01-02 22:44:21 +00:00
|
|
|
$i:item) => (mod $nm { #![$a] $i }); }
|
2013-08-08 17:28:06 +00:00
|
|
|
|
|
|
|
test!(a,
|
2024-04-06 22:43:00 +00:00
|
|
|
#[cfg(FALSE)],
|
2014-11-14 17:18:10 +00:00
|
|
|
pub fn bar() { });
|
2013-08-08 17:28:06 +00:00
|
|
|
|
|
|
|
test!(b,
|
2024-04-06 22:43:00 +00:00
|
|
|
#[cfg(not(FALSE))],
|
2014-11-14 17:18:10 +00:00
|
|
|
pub fn bar() { });
|
2013-08-08 17:28:06 +00:00
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2013-08-08 17:28:06 +00:00
|
|
|
fn main() {
|
|
|
|
a::bar();
|
2020-08-27 12:27:14 +00:00
|
|
|
//~^ ERROR failed to resolve: use of undeclared crate or module `a`
|
2013-08-08 17:28:06 +00:00
|
|
|
b::bar();
|
|
|
|
}
|