mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
24 lines
293 B
Rust
24 lines
293 B
Rust
|
//@ build-pass
|
||
|
//@ compile-flags: -C codegen-units=2 --emit asm
|
||
|
|
||
|
fn one() -> usize {
|
||
|
1
|
||
|
}
|
||
|
|
||
|
pub mod a {
|
||
|
pub fn two() -> usize {
|
||
|
::one() + ::one()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub mod b {
|
||
|
pub fn three() -> usize {
|
||
|
::one() + ::a::two()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
a::two();
|
||
|
b::three();
|
||
|
}
|