Closed
Description
Code:
macro_rules! macro_ {
($t:ty) => {
#[test]
fn test() { }
}
}
struct Foo;
struct Bar;
macro_!(Foo);
macro_!(Bar);
Error:
a.rs:4:9: 4:22 error: duplicate definition of value `test` [E0428]
a.rs:4 fn test() { }
^~~~~~~~~~~~~
a.rs:1:1: 6:2 note: in expansion of macro_!
a.rs:11:1: 11:14 note: expansion site
a.rs:4:9: 4:22 help: run `rustc --explain E0428` to see a detailed explanation
a.rs:4:9: 4:22 note: first definition of value `test` here
a.rs:4 fn test() { }
^~~~~~~~~~~~~
a.rs:1:1: 6:2 note: in expansion of macro_!
a.rs:10:1: 10:14 note: expansion site
error: aborting due to previous error