Sign in
fuchsia
/
third_party
/
rust
/
11a0b968c287c81680387ffcf112328d52d7e815
/
.
/
src
/
test
/
ui
/
hygiene
/
fields-definition.rs
blob: 173c357bd69a2b0e2e7cfee3594fa43c1ee3f19a [
file
] [
log
] [
blame
]
#![
feature
(
decl_macro
)]
macro modern
(
$a
:
ident
)
{
struct
Modern
{
a
:
u8
,
$a
:
u8
,
// OK
}
}
macro_rules
!
legacy
{
(
$a
:
ident
)
=>
{
struct
Legacy
{
a
:
u8
,
$a
:
u8
,
//~ ERROR field `a` is already declared
}
}
}
modern
!(
a
);
legacy
!(
a
);
fn
main
()
{}