rust/tests/ui/definition-reachable/auxiliary/field-method-macro.rs
2023-01-11 09:32:08 +00:00

24 lines
333 B
Rust

#![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()
}