Repository navigation
Rollup of 3 pull requests - #4855
Merged
Merged
Conversation
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
fixing a typo changelog: none
Contributor
Author
|
@bors r+ p=10 rollup=never |
Contributor
|
📌 Commit a05f3cb has been approved by |
Contributor
|
💡 This pull request was already approved, no need to approve it again.
|
Contributor
|
📌 Commit a05f3cb has been approved by |
Contributor
Contributor
|
☀️ Test successful - checks-travis, status-appveyor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
core::cmp::Ordis implemented #4842 ([comparison_chain]clippy::comparison_chainfalse positive on PartialOrd #4827 Checkcore::cmp::Ordis implemented)Failed merges:
changelog: none
r? @ghost