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