Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
macros
/
macro-with-attrs1.rs
blob: a3030e744db71f7938e99d47b64e23bc69d99801 [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
//@ compile-flags: --cfg foo --check-cfg=cfg(foo)
#[
cfg
(
foo
)]
macro_rules
!
foo
{
()
=>
(
1
)
}
#[
cfg
(
not
(
foo
))]
macro_rules
!
foo
{
()
=>
(
2
)
}
pub
fn
main
()
{
assert_eq
!(
foo
!(),
1
);
}