mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 20:14:32 -06:00
Merge pull request #512 from DavidDeprost/master
Update ch14-03-cargo-workspaces.md
This commit is contained in:
@@ -123,8 +123,8 @@ $ cargo build
|
|||||||
Finished debug [unoptimized + debuginfo] target(s) in 10.18 secs
|
Finished debug [unoptimized + debuginfo] target(s) in 10.18 secs
|
||||||
```
|
```
|
||||||
|
|
||||||
The top level *Cargo.lock* now contains information about the dependency
|
The top level *Cargo.lock* now reflects the fact that `add-one` depends
|
||||||
`add-one` has on `rand`. However, even though `rand` is used somewhere in the
|
on `rand`. However, even though `rand` is used somewhere in the
|
||||||
workspace, we can't use it in other crates in the workspace unless we add
|
workspace, we can't use it in other crates in the workspace unless we add
|
||||||
`rand` to their *Cargo.toml* as well. If we add `extern crate rand;` to
|
`rand` to their *Cargo.toml* as well. If we add `extern crate rand;` to
|
||||||
*src/main.rs* for the top level `adder` crate, for example, we'll get an error:
|
*src/main.rs* for the top level `adder` crate, for example, we'll get an error:
|
||||||
|
|||||||
Reference in New Issue
Block a user