summaryrefslogtreecommitdiff
path: root/functions/functions2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'functions/functions2.rs')
-rw-r--r--functions/functions2.rs41
1 files changed, 41 insertions, 0 deletions
diff --git a/functions/functions2.rs b/functions/functions2.rs
new file mode 100644
index 0000000..97ed8f1
--- /dev/null
+++ b/functions/functions2.rs
@@ -0,0 +1,41 @@
+// 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`.