rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

Rewrite `non_copy_const`

Open Jarcho opened this issue 1 year ago • 9 comments

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

Jarcho avatar Aug 03 '24 04:08 Jarcho

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

rustbot avatar Aug 03 '24 04:08 rustbot

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.

Jarcho avatar Aug 06 '24 20:08 Jarcho

:umbrella: The latest upstream changes (presumably #11441) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Aug 08 '24 09:08 bors

@llogiq Any chance you'll finish the review before Thursday? That's the last sync to get this in for 1.83.

Jarcho avatar Aug 19 '24 05:08 Jarcho

:umbrella: The latest upstream changes (presumably #13278) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Aug 19 '24 17:08 bors

The most pressing of the issues are now fixed in #13290.

Jarcho avatar Aug 20 '24 20:08 Jarcho

Sorry it took so long to review, but this seems good to merge. Let's hope we're in time.

@bors r+

llogiq avatar Aug 28 '24 19:08 llogiq

:pushpin: Commit b2ec6f8a7f102812845b7ee1c9effaa95fe28e09 has been approved by llogiq

It is now in the queue for this repository.

bors avatar Aug 28 '24 19:08 bors

: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:

  1. git checkout non_copy_const_ice (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. 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.

bors avatar Aug 28 '24 19:08 bors

Hey @Jarcho, do you plan on getting this merge-ready any time soon?

llogiq avatar Nov 02 '24 13:11 llogiq

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?

J-ZhengLi avatar Dec 25 '24 07:12 J-ZhengLi

:umbrella: The latest upstream changes (possibly d28d2344d000aa96bef729cf408731f952f71fb0) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Mar 31 '25 23:03 rustbot

@rustbot ready

Jarcho avatar Apr 24 '25 21:04 Jarcho

:umbrella: The latest upstream changes (possibly 56f018286b8feeed22284afc14c97aa2600afb88) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar May 02 '25 17:05 rustbot

Sorry for having this wait for so long, but it looks good to me, so ping me once the conflicts are resolved.

llogiq avatar May 12 '25 15:05 llogiq

Ping @llogiq in case github does not.

Jarcho avatar May 14 '25 02:05 Jarcho

:umbrella: The latest upstream changes (possibly 0450db33a5d8587f7c1d4b6d233dac963605766b) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar May 15 '25 17:05 rustbot

Sorry for another rebase needed.

llogiq avatar May 16 '25 06:05 llogiq