]> git.lizzy.rs Git - rust.git/blob - src/test/ui/definition-reachable/auxiliary/field-method-macro.rs
Merge commit '4a053f206fd6799a25823c307f7d7f9d897be118' into sync-rustfmt-subtree
[rust.git] / src / test / ui / definition-reachable / auxiliary / field-method-macro.rs
1 #![feature(decl_macro)]
2
3 mod n {
4     pub struct B(pub(crate) p::C);
5     impl B {
6         pub fn new() -> Self {
7             B(p::C)
8         }
9     }
10     mod p {
11         pub struct C;
12
13         impl C {
14             pub fn foo(&self) -> i32 {
15                 33
16             }
17         }
18     }
19 }
20
21 pub macro m() {
22     n::B::new().0.foo()
23 }