rust/tests/ui/definition-reachable/auxiliary/field-method-macro.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
333 B
Rust
Raw Normal View History

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