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

Rollup of 3 pull requests #4855

Merged
merged 7 commits into from
Nov 28, 2019
Merged

Rollup of 3 pull requests #4855

merged 7 commits into from
Nov 28, 2019

Conversation

phansch
Copy link
Member

@phansch phansch commented Nov 28, 2019

Successful merges:

Failed merges:

changelog: none

r? @ghost

dario23 and others added 7 commits November 19, 2019 20:03
Only emit lint, if `cmp` is actually available on the type being
compared. Don't emit lint in cases where only `PartialOrd` is
implemented.
Add some positive examples to lint docs

fixes rust-lang#4829
changelog: Add some positive examples to lint docs
…itive-4827, r=flip1995

[comparison_chain] rust-lang#4827 Check `core::cmp::Ord` is implemented

Only emit `comparison_chain` lint, if `cmp` is actually available on the type being compared. Don't emit lint in cases where only `PartialOrd` is implemented.

I haven't yet fully understood [Adjustments](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/adjustment/struct.Adjustment.html). I would appreciate, if someone could double check whether my usage of [expr_ty](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/struct.TypeckTables.html#method.expr_ty) in `clippy_lints/src/comparison_chain.rs:91` is correct or if there are cases where using [expr_ty_adjusted](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/struct.TypeckTables.html#method.expr_ty_adjusted) would lead to a different result when used with `utils::implements_trait`.

---

fixes rust-lang#4827
changelog: [comparison_chain] Check `core::cmp::Ord` is implemented
@phansch
Copy link
Member Author

phansch commented Nov 28, 2019

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Nov 28, 2019

📌 Commit a05f3cb has been approved by phansch

@bors
Copy link
Contributor

bors commented Nov 28, 2019

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Nov 28, 2019

📌 Commit a05f3cb has been approved by phansch

@bors
Copy link
Contributor

bors commented Nov 28, 2019

⌛ Testing commit a05f3cb with merge dbdd75a...

bors added a commit that referenced this pull request Nov 28, 2019
Rollup of 3 pull requests

Successful merges:

 - #4832 (Add some positive examples to lint docs)
 - #4842 ([comparison_chain] #4827 Check `core::cmp::Ord` is implemented)
 - #4847 (fixing a typo)

Failed merges:

changelog: none

r? @ghost
@bors
Copy link
Contributor

bors commented Nov 28, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing dbdd75a to master...

@bors bors merged commit a05f3cb into rust-lang:master Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants