mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
tutorial: Fix broken examples
This commit is contained in:
parent
f26df46a12
commit
21c9d0858b
@ -189,7 +189,7 @@ parentheses, while their bodies *must* be wrapped in
|
|||||||
braces. Single-statement, unbraced bodies are not allowed.
|
braces. Single-statement, unbraced bodies are not allowed.
|
||||||
|
|
||||||
~~~~
|
~~~~
|
||||||
# mod universe { fn recalibrate() -> bool { true } }
|
# mod universe { pub fn recalibrate() -> bool { true } }
|
||||||
fn main() {
|
fn main() {
|
||||||
/* A simple loop */
|
/* A simple loop */
|
||||||
loop {
|
loop {
|
||||||
@ -210,7 +210,7 @@ let hi = "hi";
|
|||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
|
|
||||||
while count < 10 {
|
while count < 10 {
|
||||||
io::println(fmt!("count: %?", i));
|
io::println(fmt!("count: %?", count));
|
||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
~~~~
|
~~~~
|
||||||
|
Loading…
Reference in New Issue
Block a user