Skip to content

Duplicate library and language feature gates silently fail #58715

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

Closed
dlrobertson opened this issue Feb 25, 2019 · 2 comments
Closed

Duplicate library and language feature gates silently fail #58715

dlrobertson opened this issue Feb 25, 2019 · 2 comments
Assignees
Labels
A-stability Area: `#[stable]`, `#[unstable]` etc. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@dlrobertson
Copy link
Contributor

Summary

If a language feature and a library feature are given the same name ![feature(<name>)] will only evaluate the language feature.

Expected Result

There should either be some sort of error that is thrown if both a language feature and a library feature have the same name, or both should be evaluated.

@Centril Centril added A-stability Area: `#[stable]`, `#[unstable]` etc. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 25, 2019
@Centril
Copy link
Contributor

Centril commented Feb 25, 2019

Seems like something that could go into tidy? cc @rust-lang/infra

@varkor
Copy link
Member

varkor commented Feb 25, 2019

It should be straightforward to make this an error. I'll look into it.

On second thoughts, we probably want to allow lang and lib features to share names.

@varkor varkor self-assigned this Feb 25, 2019
bors added a commit that referenced this issue Feb 27, 2019
Allow lang and lib features to share names

Fixes #58715.

I didn't add a test, because there's currently no standard lang test feature and I felt apprehensive about adding a permanently unstable feature. Instead, a shared lang/lib feature will be used in #57760 and will essentially provide an immediately test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stability Area: `#[stable]`, `#[unstable]` etc. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

3 participants