Skip to content

Commit

Permalink
Auto merge of #14540 - RalfJung:docs-target, r=weihanglo
Browse files Browse the repository at this point in the history
docs: Feature resolver version 2: clarify use of 'target'

IIUC, these two uses of the word `target` right next to each other in the docs actually have different meaning. That is kind of confusing, so add disambiguators and links to the glossary that should help clarify this.
  • Loading branch information
bors committed Sep 12, 2024
2 parents 9736f32 + 38b6ae0 commit 643a025
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/doc/src/reference/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 643a025

Please sign in to comment.