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

[manual_assert]: Preserve comments in the suggestion #9479

Merged
merged 4 commits into from
Oct 2, 2022

Conversation

kraktus
Copy link
Contributor

@kraktus kraktus commented Sep 14, 2022

close #7730

changelog: [manual_assert]: Preserve comments in the suggestion

@rust-highfive
Copy link

r? @flip1995

(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 Sep 14, 2022
@kraktus
Copy link
Contributor Author

kraktus commented Oct 2, 2022

Another option would be to downgrade the applicability when there are comments, but at which level should this be done? span_lint_and_sugg?

Copy link
Contributor

@llogiq llogiq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think re-adding the comments on fix is good UX. Users can still do what they want with it.

There is one re-formatting glitch that I was wondering about, otherwise this is mergeworthy.

clippy_lints/src/manual_assert.rs Outdated Show resolved Hide resolved
@llogiq
Copy link
Contributor

llogiq commented Oct 2, 2022

Weird. For some reason it couldn't compile the fixed code!?

@kraktus
Copy link
Contributor Author

kraktus commented Oct 2, 2022

I don't get the error locally using TESTNAME=manual_assert cargo uitest, but not super familiar with edition gated tests. iirc it should run them all though

@Alexendoo
Copy link
Member

Give it a try after a rebase onto master, 628a854 came after the base of this PR which includes Manishearth/compiletest-rs#258

@kraktus
Copy link
Contributor Author

kraktus commented Oct 2, 2022

After rebasing could see and fix the tests

@llogiq
Copy link
Contributor

llogiq commented Oct 2, 2022

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 2, 2022

📌 Commit 3ab02aa has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Oct 2, 2022

⌛ Testing commit 3ab02aa with merge 11a6d19...

@bors
Copy link
Collaborator

bors commented Oct 2, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 11a6d19 to master...

@bors bors merged commit 11a6d19 into rust-lang:master Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

if-then-panic suggestion discards comments
7 participants