Skip to content
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

Stable features warning should note the version stabilized, if available. #33394

Closed
Aatch opened this issue May 4, 2016 · 1 comment
Closed
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@Aatch
Copy link
Contributor

Aatch commented May 4, 2016

I use several feature gates in Ramp, two of which are now stable. However, since I use the nightly compiler, I have no idea if they're stable in the stable build of the compiler without going and investigating when they were stabilized. It would be nice if it said which version they were stabilized in so I just have to check which version the stable release is.

@huonw huonw added the A-diagnostics Area: Messages for errors, warnings, and lints label May 4, 2016
@zackmdavis
Copy link
Member

I think I've made some progress on this ...

zackmdavis added a commit to zackmdavis/rust that referenced this issue May 30, 2016
To accomplish this, we alter the checks in `rustc::middle::stability` to
use the `StabilityLevel` defined in `syntax::attr` (which includes the
version in which the feature was stabilized) rather than the local
`StabilityLevel` in the same module, and make the
`declared_stable_lang_features` field of
`syntax::feature_gate::Features` hold a Vec of feature-name, span
tuples (in analogy to the `declared_lib_features` field) rather than
just spans.

This is in the matter of issue rust-lang#33394.
Manishearth added a commit to Manishearth/rust that referenced this issue Jun 1, 2016
…notes_version_stabilized, r=brson

stable features lint warning mentions version stabilized

To accomplish this, we alter the checks in `rustc::middle::stability` to
use the `StabilityLevel` defined in `syntax::attr` (which includes the
version in which the feature was stabilized) rather than the local
`StabilityLevel` in the same module, and make the
`declared_stable_lang_features` field of
`syntax::feature_gate::Features` hold a Vec of feature-name, span
tuples (in analogy to the `declared_lib_features` field) rather than
just spans.

Fixes rust-lang#33394.

![stable_features_version_lint_before_and_after](https://cloud.githubusercontent.com/assets/1076988/15659237/5d952a3a-267c-11e6-9181-c9e612eefd7d.png)

r? @brson (tagging Brian because he [wrote](rust-lang#21958) the lint)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

3 participants