Skip to content

More helpful error for invalid cargo-features = [] #15781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2025

Conversation

kornelski
Copy link
Contributor

The error message for unknown values of cargo-features was unhelpful:

Caused by:
  unknown cargo feature `build-dir`

I've made it more explanatory, and matching the style of the other errors:

Caused by:
  feature `build-dir` is not a valid unstable feature for Cargo.toml

  This feature can be enabled via -Zbuild-dir or the `[unstable]` section in config.toml.
  See https://doc.rust-lang.org/cargo/reference/unstable.html for more information.

@rustbot
Copy link
Collaborator

rustbot commented Jul 28, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-unstable Area: nightly unstable support S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 28, 2025
@kornelski kornelski force-pushed the feature-error branch 2 times, most recently from adead0c to 794927b Compare July 28, 2025 18:18
@epage
Copy link
Contributor

epage commented Jul 28, 2025

Thanks for working to improve this!

@kornelski kornelski force-pushed the feature-error branch 3 times, most recently from d744ae0 to f1844ee Compare July 29, 2025 01:09
@kornelski kornelski force-pushed the feature-error branch 2 times, most recently from 931489d to 9d87062 Compare August 10, 2025 03:03
Copy link
Contributor

@epage epage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@epage epage added this pull request to the merge queue Aug 12, 2025
Merged via the queue into rust-lang:master with commit ece031c Aug 12, 2025
24 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-unstable Area: nightly unstable support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants