Rewrite `non_copy_const`
fixes #12979 fixes #12951 fixes #13233
Tests still need to be finished and the docs still need to be updated, but this should otherwise ready.
changelog: Lint declare_interior_mutable_const and borrow_interior_mutable_const more precisely
r? @llogiq
rustbot has assigned @llogiq. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
I think this is ready now. I'll just need to add an overview for the code and remove the old tests (the new ones should cover all those cases now).
#13200 still needs to be looked at as well.
:umbrella: The latest upstream changes (presumably #11441) made this pull request unmergeable. Please resolve the merge conflicts.
@llogiq Any chance you'll finish the review before Thursday? That's the last sync to get this in for 1.83.
:umbrella: The latest upstream changes (presumably #13278) made this pull request unmergeable. Please resolve the merge conflicts.
The most pressing of the issues are now fixed in #13290.
Sorry it took so long to review, but this seems good to merge. Let's hope we're in time.
@bors r+
:pushpin: Commit b2ec6f8a7f102812845b7ee1c9effaa95fe28e09 has been approved by llogiq
It is now in the queue for this repository.
:lock: Merge conflict
This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.
How do I rebase?
Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:
git checkout non_copy_const_ice(switch to your branch)git fetch upstream master(retrieve the latest master)git rebase upstream/master -p(rebase on top of it)- Follow the on-screen instruction to resolve conflicts (check
git statusif you got lost). git push self non_copy_const_ice --force-with-lease(update this PR)
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.
Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.
Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.
Error message
Auto-merging tests/ui/declare_interior_mutable_const/others.stderr
CONFLICT (content): Merge conflict in tests/ui/declare_interior_mutable_const/others.stderr
Auto-merging tests/ui/declare_interior_mutable_const/others.rs
Removing tests/ui/crashes/ice-9445.stderr
Auto-merging tests/ui/borrow_interior_mutable_const/others.stderr
CONFLICT (content): Merge conflict in tests/ui/borrow_interior_mutable_const/others.stderr
Auto-merging tests/ui/borrow_interior_mutable_const/others.rs
CONFLICT (content): Merge conflict in tests/ui/borrow_interior_mutable_const/others.rs
Auto-merging clippy_utils/src/ty.rs
Auto-merging clippy_lints/src/non_copy_const.rs
CONFLICT (content): Merge conflict in clippy_lints/src/non_copy_const.rs
Automatic merge failed; fix conflicts and then commit the result.
Hey @Jarcho, do you plan on getting this merge-ready any time soon?
Hello, this is a friendly ping from triage~
Looks like this PR fixes an ICE that has been troublesome for a while now, so, @Jarcho would you mind doing a quick rebase?
:umbrella: The latest upstream changes (possibly d28d2344d000aa96bef729cf408731f952f71fb0) made this pull request unmergeable. Please resolve the merge conflicts.
@rustbot ready
:umbrella: The latest upstream changes (possibly 56f018286b8feeed22284afc14c97aa2600afb88) made this pull request unmergeable. Please resolve the merge conflicts.
Sorry for having this wait for so long, but it looks good to me, so ping me once the conflicts are resolved.
Ping @llogiq in case github does not.
:umbrella: The latest upstream changes (possibly 0450db33a5d8587f7c1d4b6d233dac963605766b) made this pull request unmergeable. Please resolve the merge conflicts.
Sorry for another rebase needed.