mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
17 lines
240 B
Rust
17 lines
240 B
Rust
//@ run-pass
|
|
// Functions can return unnameable types
|
|
|
|
mod m1 {
|
|
mod m2 {
|
|
#[derive(Debug)]
|
|
pub struct A;
|
|
}
|
|
use self::m2::A;
|
|
pub fn x() -> A { A }
|
|
}
|
|
|
|
fn main() {
|
|
let x = m1::x();
|
|
println!("{:?}", x);
|
|
}
|