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

Ignore synthetic type parameters for extra_unused_type_parameters #10338

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

mkrasnitski
Copy link
Contributor

@mkrasnitski mkrasnitski commented Feb 12, 2023

There was a minor bug around calculating spans when forming the help message. An example:

fn unused_opaque<A, B>(dummy: impl Default) {}
//               ^^ ^

In this case, the entire list of generics should be highlighted, instead of each individual parameter. The culprit is the impl Default, which registers as a type parameter but doesn't live within the <...>. Because synthetic parameters can't ever be manually created, we just ignore them for this lint.

r? @flip1995
changelog: none

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 12, 2023
@mkrasnitski mkrasnitski changed the title Ignore synthetic type parameters for extra_unused_type_parameters. Ignore synthetic type parameters for extra_unused_type_parameters Feb 12, 2023
@flip1995
Copy link
Member

@bors r+

Thanks! (Let's hope this doesn't conflict with the other PR)

@bors
Copy link
Contributor

bors commented Feb 15, 2023

📌 Commit b522965 has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Feb 15, 2023

🔒 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 synthetic-params (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 synthetic-params --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/extra_unused_type_parameters.stderr
Auto-merging tests/ui/extra_unused_type_parameters.rs
CONFLICT (content): Merge conflict in tests/ui/extra_unused_type_parameters.rs
Auto-merging clippy_lints/src/extra_unused_type_parameters.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors
Copy link
Contributor

bors commented Feb 15, 2023

☔ The latest upstream changes (presumably #10321) made this pull request unmergeable. Please resolve the merge conflicts.

@mkrasnitski
Copy link
Contributor Author

Sorry about that - conflicts should be resolved now @flip1995

@flip1995
Copy link
Member

No worries! Thanks for resolving them so quickly.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 15, 2023

📌 Commit 1ee4651 has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Feb 15, 2023

⌛ Testing commit 1ee4651 with merge 5b6795f...

@bors
Copy link
Contributor

bors commented Feb 15, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 5b6795f to master...

@bors bors merged commit 5b6795f into rust-lang:master Feb 15, 2023
@mkrasnitski mkrasnitski deleted the synthetic-params branch February 15, 2023 15:40
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.

4 participants