@@ -202,29 +202,12 @@ enabled:
202202 ` package-name/feature-name ` syntax can be used to specify features for
203203 specific workspace members.
204204
205- > ** Note** : With the ` resolver = "1" ` option [ described
206- > below] ( #feature-resolver-version-2 ) , the features chosen are for the
207- > package in the current directory, not the packages selected with the ` -p `
208- > flags. With the ` resolver = "2" ` , it will instead enable the listed
209- > features for the packages listed in the ` -p ` flags.
210- >
211- > For example, when ` resolver = "2" ` is enabled:
212- >
213- > cargo build -p member1 -p member2 --features foo,bar
214- >
215- > In this situation, features "foo" and "bar" are enabled on the given
216- > members only if the member defines that feature. It is an error if none of
217- > the selected packages defines a given feature.
218-
219205* ` --all-features ` : Activates all features of all packages selected on the
220206 command-line.
221207
222208* ` --no-default-features ` : Does not activate the [ ` default `
223209 feature] ( #the-default-feature ) of the selected packages.
224210
225- > ** Note** : With the ` resolver = "1" ` option, this only applies to the
226- > package in the current directory.
227-
228211[ workspace ] : workspaces.md
229212
230213### Feature unification
@@ -248,10 +231,6 @@ another dependency `bar` which enables the "std" and "winnt" features of
248231[ `winapi` ] : https://crates.io/crates/winapi
249232[ winapi-features ] : https://github.com/retep998/winapi-rs/blob/0.3.9/Cargo.toml#L25-L431
250233
251- > ** Note** : Sometimes feature unification may be a little too aggressive. See
252- > the ` resolver = "2" ` option [ described below] ( #feature-resolver-version-2 )
253- > for improved behavior.
254-
255234A consequence of this is that features should be * additive* . That is, enabling
256235a feature should not disable functionality, and it should usually be safe to
257236enable any combination of features. A feature should not introduce a
@@ -379,6 +358,10 @@ the command-line with `-p` flags. For example:
379358cargo build -p foo -p bar --features foo-feat,bar-feat
380359```
381360
361+ Additionally, with ` resolver = "1" ` , the ` --no-default-features ` flag only
362+ disables the default feature for the package in the current directory. With
363+ version "2", it will disable the default features for all workspace members.
364+
382365The resolver is a global option that affects the entire workspace. The
383366` resolver ` version in dependencies is ignored, only the value in the top-level
384367package will be used. If using a [ virtual workspace] , the version should be
0 commit comments