-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #5353 - matklad:features, r=alexcrichton
New semantics for `--features` flag Historically, feature-related flags like `--all-features`, `--no-default-features` and `--features` operated on the *current* package. That is, `cargo --package foo --feature feat` would activate `feat` for the package at the current working directory, and not for the `foo` package. `-Z package-features` flag implements the more obvious semantics for this combination of flags. This changes behavior, and that is why we want to start with an unstable opt-in. The changes are: * `--feature` flag affects the selected package. It is an error to specify `--feature` with more than a single `-p`, or with `-p` outside workspace (the latter could work in theory, but would be hard to implement). * `--all-features` and `--no-default-features` affect all selected packages, and not the one at cwd. * The package in `cwd` is not implicitly enabled when doing feature selection. That is, `cargo build -Z package-features -p foo` could select *less* features for various packages than `cargo build -p foo`. r? @alexcrichton
- Loading branch information
Showing
3 changed files
with
158 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters