rust-clippy/clippy_lints
Phil Hansch 1165176840
Rollup merge of #4842 - timbodeit:comparison-chain-false-positive-4827, r=flip1995
[comparison_chain] #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 #4827
changelog: [comparison_chain] Check `core::cmp::Ord` is implemented
2019-11-28 10:19:05 +01:00
..
src Rollup merge of #4842 - timbodeit:comparison-chain-false-positive-4827, r=flip1995 2019-11-28 10:19:05 +01:00
Cargo.toml bump smallvec to 1.0.0 2019-11-06 17:46:45 +07:00
README.md rust-lang-nursery/rust-clippy => rust-lang/rust-clippy 2018-11-22 04:40:09 +01:00

This crate contains Clippy lints. For the main crate, check crates.io or GitHub.