mirror of https://github.com/rust-lang/rustlings
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
341 B
Rust
42 lines
341 B
Rust
9 years ago
|
// Make me compile! Scroll down for hints :)
|
||
|
|
||
|
fn main() {
|
||
|
call_me(3);
|
||
|
}
|
||
|
|
||
|
fn call_me(num) {
|
||
|
for i in 0..num {
|
||
|
println!("Ring! Call number {}", i + 1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
// Rust requires that all parts of a function's signature have type annotations,
|
||
|
// but `call_me` is missing the type annotation of `num`.
|