From fd237525b9e7fb1a2256746cda5c89798c8e99c6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 12 Sep 2024 07:55:14 +0200 Subject: [PATCH] docs: Feature resolver version 2: clarify use of 'target' --- src/doc/src/reference/features.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/doc/src/reference/features.md b/src/doc/src/reference/features.md index e3a845d95054..8ba4251effa9 100644 --- a/src/doc/src/reference/features.md +++ b/src/doc/src/reference/features.md @@ -365,11 +365,11 @@ that unification can be unwanted. The exact situations are described in the [resolver chapter][resolver-v2], but in short, it avoids unifying in these situations: -* Features enabled on [platform-specific dependencies] for targets not +* Features enabled on [platform-specific dependencies] for [target architectures][target] not currently being built are ignored. * [Build-dependencies] and proc-macros do not share features with normal dependencies. -* [Dev-dependencies] do not activate features unless building a target that +* [Dev-dependencies] do not activate features unless building a [cargo target][target] that needs them (like tests or examples). Avoiding the unification is necessary for some situations. For example, if a @@ -393,6 +393,8 @@ the resolved features. For build dependencies, this is not necessary if you are cross-compiling with the `--target` flag because build dependencies are always built separately from normal dependencies in that scenario. +[target]: ../appendix/glossary.md#target + ### Resolver version 2 command-line flags The `resolver = "2"` setting also changes the behavior of the `--features` and