From 1ae77026813e8b5dab36ce8ad0a09de25da15a44 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Wed, 8 Jul 2015 13:09:22 -0400 Subject: [PATCH] TRPL: make version constraits explicit We weren't explicit enough about Cargo's default version behavior. For rust-lang/rust at least, Fixes #26482 --- src/doc/trpl/guessing-game.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/doc/trpl/guessing-game.md b/src/doc/trpl/guessing-game.md index a599b8a855e92..1784c253f7f47 100644 --- a/src/doc/trpl/guessing-game.md +++ b/src/doc/trpl/guessing-game.md @@ -360,10 +360,12 @@ rand="0.3.0" The `[dependencies]` section of `Cargo.toml` is like the `[package]` section: everything that follows it is part of it, until the next section starts. Cargo uses the dependencies section to know what dependencies on external -crates you have, and what versions you require. In this case, we’ve used version `0.3.0`. +crates you have, and what versions you require. In this case, we’ve specified version `0.3.0`, +which Cargo understands to be any release that’s compatible with this specific version. Cargo understands [Semantic Versioning][semver], which is a standard for writing version -numbers. If we wanted to use the latest version we could use `*` or we could use a range -of versions. [Cargo’s documentation][cargodoc] contains more details. +numbers. If we wanted to use only `0.3.0` exactly, we could use `=0.3.0`. If we +wanted to use the latest version we could use `*`; We could use a range of +versions. [Cargo’s documentation][cargodoc] contains more details. [semver]: http://semver.org [cargodoc]: http://doc.crates.io/crates-io.html