diff --git a/src/doc/src/reference/overriding-dependencies.md b/src/doc/src/reference/overriding-dependencies.md index 504811d5bba5..d3e2fa42af14 100644 --- a/src/doc/src/reference/overriding-dependencies.md +++ b/src/doc/src/reference/overriding-dependencies.md @@ -291,6 +291,10 @@ also be patched with versions of crates that already exist. If a source is patched with a crate version that already exists in the source, then the source's original crate is replaced. +Cargo only looks at the patch settings in the `Cargo.toml` manifest at the +root of the workspace. Patch settings defined in dependencies will be +ignored. + ### The `[replace]` section > **Note**: `[replace]` is deprecated. You should use the @@ -313,6 +317,10 @@ dependencies, except that you can't specify features. Note that when a crate is overridden the copy it's overridden with must have both the same name and version, but it can come from a different source (e.g., git or a local path). +Cargo only looks at the replace settings in the `Cargo.toml` manifest at the +root of the workspace. Replace settings defined in dependencies will be +ignored. + ### `paths` overrides Sometimes you're only temporarily working on a crate and you don't want to have diff --git a/src/doc/src/reference/workspaces.md b/src/doc/src/reference/workspaces.md index 72796500ebf5..08b8780ddda3 100644 --- a/src/doc/src/reference/workspaces.md +++ b/src/doc/src/reference/workspaces.md @@ -36,6 +36,8 @@ The `[workspace]` table supports the following sections: * [`metadata`](#the-metadata-table) — Extra settings for external tools. * [`package`](#the-package-table) — Keys for inheriting in packages. * [`dependencies`](#the-dependencies-table) — Keys for inheriting in package dependencies. +* [`[patch]`](overriding-dependencies.md#the-patch-section) — Override dependencies. +* [`[replace]`](overriding-dependencies.md#the-replace-section) — Override dependencies (deprecated). * [`[profile]`](profiles.md) — Compiler settings and optimizations. ### The `[workspace]` section