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

Hidden code suggestions are not tested #73641

Closed
SNCPlay42 opened this issue Jun 23, 2020 · 1 comment · Fixed by #73953
Closed

Hidden code suggestions are not tested #73641

SNCPlay42 opened this issue Jun 23, 2020 · 1 comment · Fixed by #73953
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` A-testsuite Area: The testsuite used to check the correctness of rustc 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.

Comments

@SNCPlay42
Copy link
Contributor

The enum SuggestionStyle (which is used by DiagnosticBuilder functions like span_suggestion_short) allows for code suggestions to not be displayed in compiler output, but still be made available to tools like IDE quick-fix and cargo fix, if it is obvious from the diagnostics what should be done.

But UI tests only check compiler output, so such suggestions are not being tested to see if they are valid/good/etc.

@rustbot modify labels: +A-diagnostics +A-suggestion-diagnostics +A-testsuite

@rustbot rustbot added A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` A-testsuite Area: The testsuite used to check the correctness of rustc labels Jun 23, 2020
@estebank
Copy link
Contributor

All span_suggestion_short and span_suggestion_hidden cases should have tests using // run-rustfix to confirm their successful application. We probably need to audit that we are currently doing so.

@JohnTitor JohnTitor added 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 Jun 26, 2020
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 4, 2020
…bank

Audit hidden/short code suggestions

Should fix rust-lang#73641.
Audit uses of `span_suggestion_short` and `tool_only_span_suggestion` (`span_suggestion_hidden` is already tested with `run-rustfix`). Leave some FIXMEs for futher improvements/fixes.
r? @estebank
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 4, 2020
…bank

Audit hidden/short code suggestions

Should fix rust-lang#73641.
Audit uses of `span_suggestion_short` and `tool_only_span_suggestion` (`span_suggestion_hidden` is already tested with `run-rustfix`). Leave some FIXMEs for futher improvements/fixes.
r? @estebank
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 6, 2020
…bank

Audit hidden/short code suggestions

Should fix rust-lang#73641.
Audit uses of `span_suggestion_short` and `tool_only_span_suggestion` (`span_suggestion_hidden` is already tested with `run-rustfix`). Leave some FIXMEs for futher improvements/fixes.
r? @estebank
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 6, 2020
…bank

Audit hidden/short code suggestions

Should fix rust-lang#73641.
Audit uses of `span_suggestion_short` and `tool_only_span_suggestion` (`span_suggestion_hidden` is already tested with `run-rustfix`). Leave some FIXMEs for futher improvements/fixes.
r? @estebank
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 6, 2020
…bank

Audit hidden/short code suggestions

Should fix rust-lang#73641.
Audit uses of `span_suggestion_short` and `tool_only_span_suggestion` (`span_suggestion_hidden` is already tested with `run-rustfix`). Leave some FIXMEs for futher improvements/fixes.
r? @estebank
@bors bors closed this as completed in e74ab50 Jul 7, 2020
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-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` A-testsuite Area: The testsuite used to check the correctness of rustc 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants