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

Downgrade interior_mutable_const lints to warn by default #6098

Merged
merged 1 commit into from
Oct 2, 2020
Merged

Downgrade interior_mutable_const lints to warn by default #6098

merged 1 commit into from
Oct 2, 2020

Conversation

longlb
Copy link
Contributor

@longlb longlb commented Sep 30, 2020

This change updates the two lints in the file non_copy_const.rs to be warn by default rather than deny by default. It also updates the known problems for declare_interior_mutable_const to mention some issues that are affected by the lints.

This is a repeat pull request since I botched the first one (#6012). Apart from my messing up the commits of that one, I also had a problem where the stderr of the tests didn't change despite me changing both lints to warn by default. Is this normal behaviour for some lints or do I need to adjust the tests to accommodate the change?

fixes #5863
changelog: none

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ebroto (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 30, 2020
Copy link
Member

@ebroto ebroto left a comment

Choose a reason for hiding this comment

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

I also had a problem where the stderr of the tests didn't change despite me changing both lints to warn by default. Is this normal behaviour for some lints or do I need to adjust the tests to accommodate the change?

This is because the tests were already setting the lint level to warning for those lints. Don't worry, you don't need to change anything related to that.

clippy_lints/src/non_copy_const.rs Outdated Show resolved Hide resolved
clippy_lints/src/non_copy_const.rs Outdated Show resolved Hide resolved
@ebroto ebroto added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Sep 30, 2020
clippy_lints/src/non_copy_const.rs Show resolved Hide resolved
clippy_lints/src/non_copy_const.rs Show resolved Hide resolved
clippy_lints/src/non_copy_const.rs Outdated Show resolved Hide resolved
Copy link
Member

@ebroto ebroto left a comment

Choose a reason for hiding this comment

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

Just a nit about the placement of the FIXMEs.

clippy_lints/src/non_copy_const.rs Outdated Show resolved Hide resolved
clippy_lints/src/non_copy_const.rs Show resolved Hide resolved
clippy_lints/src/non_copy_const.rs Show resolved Hide resolved
Copy link
Member

@ebroto ebroto left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution!

There were some revert commits, so I went ahead and squashed the commits into one. You are still the author, of course :)

I went for doing it myself because last time you ran into some problems and I didn't want your work to go to waste, but for the future you can find here some cool instructions about how to do that.

@ebroto
Copy link
Member

ebroto commented Oct 2, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 2, 2020

📌 Commit 8b8c63f has been approved by ebroto

@bors
Copy link
Collaborator

bors commented Oct 2, 2020

⌛ Testing commit 8b8c63f with merge a1a7f20...

@bors
Copy link
Collaborator

bors commented Oct 2, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: ebroto
Pushing a1a7f20 to master...

@bors bors merged commit a1a7f20 into rust-lang:master Oct 2, 2020
@longlb
Copy link
Contributor Author

longlb commented Oct 2, 2020

Bless your soul my friend, thanks a bunch for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

declare_interior_mutable_const should probably be downgraded
5 participants