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

New lint: Recommend using ptr::eq when possible #6130

Merged
merged 3 commits into from
Oct 9, 2020
Merged

New lint: Recommend using ptr::eq when possible #6130

merged 3 commits into from
Oct 9, 2020

Conversation

ambroisie
Copy link
Contributor

This is based almost entirely on the code available in the previous PR #4596. I merely updated the code to make it compile.

Fixes #3661.

  • I'm not sure about the lint name, but it was the one used in the original PR.
  • Added passing UI tests (including committed .stderr file)
  • cargo test passes locally
  • Executed cargo dev update_lints
  • Added lint documentation
  • Run cargo dev fmt

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 @Manishearth (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 Oct 7, 2020
This is based almost entirely on the code available in the previous PR #4596.
Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>
bors added a commit that referenced this pull request Oct 9, 2020
Rename tables to typecheck_result()

While working on #6130, I noticed that part of the documentation was updated to use `LateContext::typeck_results`, but the paragraph still referred to the old `tables` field of `LateContext`.

---

*Please keep the line below*
changelog: none
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

@bors r+

@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 9, 2020

📌 Commit 6edde81 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Oct 9, 2020

⌛ Testing commit 6edde81 with merge 947516f...

@bors
Copy link
Contributor

bors commented Oct 9, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 947516f to master...

@bors bors merged commit 947516f into rust-lang:master Oct 9, 2020
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.

new lint: suggest ptr::eq() instead of "x as *const _ as usize == y as *const as usize"
5 participants