Skip to content

Commit 61c1cf7

Browse files
committed
Rollup merge of rust-lang#25179 - bengesoff:patch-1, r=steveklabnik
Following paragraph says "we've used `*` which..." but code says "rand=\"0.3.0\""
2 parents 4c0f7fd + 888086d commit 61c1cf7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/doc/trpl/guessing-game.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,10 @@ rand="0.3.0"
358358
The `[dependencies]` section of `Cargo.toml` is like the `[package]` section:
359359
everything that follows it is part of it, until the next section starts.
360360
Cargo uses the dependencies section to know what dependencies on external
361-
crates you have, and what versions you require. In this case, we’ve used `*`,
362-
which means that we’ll use the latest version of `rand`. Cargo understands
363-
[Semantic Versioning][semver], which is a standard for writing version
364-
numbers. If we wanted a specific version or range of versions, we could be
365-
more specific here. [Cargo’s documentation][cargodoc] contains more details.
361+
crates you have, and what versions you require. In this case, we’ve used version `0.3.0`.
362+
Cargo understands [Semantic Versioning][semver], which is a standard for writing version
363+
numbers. If we wanted to use the latest version we could use `*` or we could use a range
364+
of versions. [Cargo’s documentation][cargodoc] contains more details.
366365

367366
[semver]: http://semver.org
368367
[cargodoc]: http://doc.crates.io/crates-io.html
@@ -410,7 +409,7 @@ $ cargo build
410409
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
411410
```
412411

413-
So, we told Cargo we wanted any version of `rand`, and so it fetched the latest
412+
So, we told Cargo we wanted any `0.3.x` version of `rand`, and so it fetched the latest
414413
version at the time this was written, `v0.3.8`. But what happens when next
415414
week, version `v0.3.9` comes out, with an important bugfix? While getting
416415
bugfixes is important, what if `0.3.9` contains a regression that breaks our

0 commit comments

Comments
 (0)