Skip to content

Commit

Permalink
Guide: Cargo now adds bang and drops the semicolon for ‘Hello, world’
Browse files Browse the repository at this point in the history
  • Loading branch information
chastell committed Oct 25, 2014
1 parent a34b8de commit 6a22454
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/doc/guide.md
Expand Up @@ -1793,7 +1793,7 @@ Finally, Cargo generated a hello, world for us. Check out `src/main.rs`:

```{rust}
fn main() {
println!("Hello, world!");
println!("Hello, world!")
}
```

Expand Down Expand Up @@ -2682,12 +2682,12 @@ like this:

```
fn main() {
println!("Hello, world!");
println!("Hello, world!")
}
mod hello {
fn print_hello() {
println!("Hello, world!");
println!("Hello, world!")
}
}
```
Expand Down Expand Up @@ -2721,7 +2721,7 @@ fn main() {
mod hello {
fn print_hello() {
println!("Hello, world!");
println!("Hello, world!")
}
}
```
Expand All @@ -2744,7 +2744,7 @@ fn main() {
mod hello {
pub fn print_hello() {
println!("Hello, world!");
println!("Hello, world!")
}
}
```
Expand Down Expand Up @@ -2923,7 +2923,7 @@ $ cargo test
Compiling testing v0.0.1 (file:///home/you/projects/testing)
/home/you/projects/testing/src/main.rs:1:1: 3:2 warning: code is never used: `main`, #[warn(dead_code)] on by default
/home/you/projects/testing/src/main.rs:1 fn main() {
/home/you/projects/testing/src/main.rs:2 println!("Hello, world");
/home/you/projects/testing/src/main.rs:2 println!("Hello, world!")
/home/you/projects/testing/src/main.rs:3 }
running 0 tests
Expand Down Expand Up @@ -2962,7 +2962,7 @@ You can run all of your tests with `cargo test`. This runs both your tests in
```{notrust,ignore}
/home/you/projects/testing/src/main.rs:1:1: 3:2 warning: code is never used: `main`, #[warn(dead_code)] on by default
/home/you/projects/testing/src/main.rs:1 fn main() {
/home/you/projects/testing/src/main.rs:2 println!("Hello, world");
/home/you/projects/testing/src/main.rs:2 println!("Hello, world!")
/home/you/projects/testing/src/main.rs:3 }
```

Expand Down Expand Up @@ -3051,7 +3051,7 @@ function. Change your `src/main.rs` to look like this:
```{rust}
#[cfg(not(test))]
fn main() {
println!("Hello, world");
println!("Hello, world!")
}
```

Expand Down Expand Up @@ -3133,7 +3133,7 @@ extern crate testing;
#[cfg(not(test))]
fn main() {
println!("Hello, world");
println!("Hello, world!")
}
```

Expand Down

0 comments on commit 6a22454

Please sign in to comment.