diff options
Diffstat (limited to 'tests/ui/definition-reachable/auxiliary/field-method-macro.rs')
-rw-r--r-- | tests/ui/definition-reachable/auxiliary/field-method-macro.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/definition-reachable/auxiliary/field-method-macro.rs b/tests/ui/definition-reachable/auxiliary/field-method-macro.rs new file mode 100644 index 000000000..30ba70bdf --- /dev/null +++ b/tests/ui/definition-reachable/auxiliary/field-method-macro.rs @@ -0,0 +1,23 @@ +#![feature(decl_macro)] + +mod n { + pub struct B(pub(crate) p::C); + impl B { + pub fn new() -> Self { + B(p::C) + } + } + mod p { + pub struct C; + + impl C { + pub fn foo(&self) -> i32 { + 33 + } + } + } +} + +pub macro m() { + n::B::new().0.foo() +} |