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

Suggest #[feature(min_specialization)] instead of #[feature(specialization)] when user attempts to use it #77913

Closed
nagisa opened this issue Oct 13, 2020 · 1 comment · Fixed by #77925
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-specialization Area: Trait impl specialization A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` C-enhancement Category: An issue proposing an enhancement or a PR with one. D-papercut Diagnostics: An error or lint that needs small tweaks. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nagisa
Copy link
Member

nagisa commented Oct 13, 2020

Right now we're suggesting something that will then immediately raise incomplete_features lint. In majority of use-cases min_specialization will likely work just as well, so we should probably suggest that as a first option first.

@nagisa nagisa added A-diagnostics Area: Messages for errors, warnings, and lints A-specialization Area: Trait impl specialization D-papercut Diagnostics: An error or lint that needs small tweaks. labels Oct 13, 2020
@JohnTitor JohnTitor added A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 13, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this issue Oct 16, 2020
…dtwco,oli-obk

Suggest minimal subset features in `incomplete_features` lint

This tells users that we have a minimal subset feature of it and they can fix the lint warning without allowing it.
The wording improvement is helpful :)

Fixes rust-lang#77913
@bors bors closed this as completed in 9600fda Oct 16, 2020
@nagisa
Copy link
Member Author

nagisa commented Oct 16, 2020

Are we comfortable with considering this complete? From what I can tell using a feature will still suggest to add #![feature(...)] with the non-minimal feature first.

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 A-specialization Area: Trait impl specialization A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` C-enhancement Category: An issue proposing an enhancement or a PR with one. D-papercut Diagnostics: An error or lint that needs small tweaks. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants