2016-04-23 06:22:38 +00:00
|
|
|
macro_rules! define_struct {
|
|
|
|
($t:ty) => {
|
|
|
|
struct S1(pub($t));
|
2017-03-17 21:13:00 -07:00
|
|
|
struct S2(pub (in foo) ());
|
|
|
|
struct S3(pub($t) ());
|
2018-06-04 22:35:39 -04:00
|
|
|
//~^ ERROR expected one of `)` or `,`, found `(`
|
2016-04-23 06:22:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod foo {
|
2018-12-16 20:23:27 +03:00
|
|
|
define_struct! { foo } //~ ERROR cannot find type `foo` in this scope
|
2020-01-08 20:02:10 +03:00
|
|
|
//~| ERROR cannot find type `foo` in this scope
|
2016-04-23 06:22:38 +00:00
|
|
|
}
|
2018-12-16 20:23:27 +03:00
|
|
|
|
|
|
|
fn main() {}
|