mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
9 lines
164 B
Rust
9 lines
164 B
Rust
|
fn takes_two(x: &int, y: &int) -> int { *x + *y }
|
||
|
|
||
|
fn has_two(x: &a/int, y: &b/int) -> int {
|
||
|
takes_two(x, y)
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
assert has_two(&20, &2) == 22;
|
||
|
}
|