From: bors Date: Fri, 13 Apr 2018 16:28:23 +0000 (+0000) Subject: Auto merge of #5353 - matklad:features, r=alexcrichton X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~1^2~74 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=008c3690846798d678f4a0a45ee46cc9ff6dc90f;p=cargo.git 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 --- 008c3690846798d678f4a0a45ee46cc9ff6dc90f