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

Add suggestion for PATTERNS_IN_FNS_WITHOUT_BODY #79414

Conversation

sasurau4
Copy link
Contributor

@sasurau4 sasurau4 commented Nov 25, 2020

Overview

Fix #78927

@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 25, 2020
@sasurau4 sasurau4 changed the title add suggestion for PATTERNS_IN_FNS_WITHOUT_BODY Add suggestion for PATTERNS_IN_FNS_WITHOUT_BODY Nov 25, 2020
@sasurau4 sasurau4 force-pushed the feature/add-suggestion-for-pattern-in-fns-without-body branch from 2125d28 to 03c5c0b Compare November 26, 2020 10:22
@matthewjasper
Copy link
Contributor

I think that it makes sense to keep this being buffered in ast validation, since that's where the error is emitted for more complex patterns. To be able to add a suggestion for a buffered lint, you can add a variant to BuiltinLintDiagnostics and then call buffer_lint_with_diagnostic instead of buffer_lint.

@sasurau4 sasurau4 force-pushed the feature/add-suggestion-for-pattern-in-fns-without-body branch from 03c5c0b to 3e6cf36 Compare November 30, 2020 14:25
@sasurau4
Copy link
Contributor Author

@matthewjasper Thanks for your suggestion!

@sasurau4 sasurau4 force-pushed the feature/add-suggestion-for-pattern-in-fns-without-body branch from 3e6cf36 to e97b97e Compare December 21, 2020 12:40
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 10, 2021

📌 Commit e97b97e has been approved by matthewjasper

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 10, 2021
@bors
Copy link
Contributor

bors commented Jan 10, 2021

⌛ Testing commit e97b97e with merge c97f11a...

@bors
Copy link
Contributor

bors commented Jan 10, 2021

☀️ Test successful - checks-actions
Approved by: matthewjasper
Pushing c97f11a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 10, 2021
@bors bors merged commit c97f11a into rust-lang:master Jan 10, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 10, 2021
@sasurau4 sasurau4 deleted the feature/add-suggestion-for-pattern-in-fns-without-body branch January 11, 2021 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On "pattern in arg for fn def without body" emit structured suggestion
5 participants