Skip to content

Rollup of 3 pull requests - #4855

Merged
bors merged 7 commits into
rust-lang:masterfrom
phansch:rollup-x7yail7
Nov 28, 2019
Merged

bors merged 7 commits into
rust-lang:masterfrom
phansch:rollup-x7yail7

Conversation

@phansch

@phansch phansch commented Nov 28, 2019 •

Copy link
Copy Markdown
Contributor

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

phansch commented Nov 28, 2019 •

Copy link
Copy Markdown
Contributor Author

@bors r+ p=10 rollup=never

@bors

bors commented Nov 28, 2019

Copy link
Copy Markdown
Contributor

📌 Commit a05f3cb has been approved by phansch

@bors

bors commented Nov 28, 2019

Copy link
Copy Markdown
Contributor

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

@bors

bors commented Nov 28, 2019

Copy link
Copy Markdown
Contributor

📌 Commit a05f3cb has been approved by phansch

@bors

bors commented Nov 28, 2019

Copy link
Copy Markdown
Contributor

⌛ 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

bors commented Nov 28, 2019

Copy link
Copy Markdown
Contributor

☀️ 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