diff --git a/.gitignore b/.gitignore index 7b8050a6563..705ebe4ba0b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,7 @@ util/gh-pages/lints.json *.rs.bk helper.txt + +*.stdout + +.vscode \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ace142aa76..1aee256f8bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. +## 0.0.122 — 2017-04-07 +* Rustup to *rustc 1.18.0-nightly (91ae22a01 2017-04-05)* +* New lint: [`op_ref`] + ## 0.0.121 — 2017-03-21 * Rustup to *rustc 1.17.0-nightly (134c4a0f0 2017-03-20)* @@ -417,6 +421,7 @@ All notable changes to this project will be documented in this file. [`nonsensical_open_options`]: https://github.com/Manishearth/rust-clippy/wiki#nonsensical_open_options [`not_unsafe_ptr_arg_deref`]: https://github.com/Manishearth/rust-clippy/wiki#not_unsafe_ptr_arg_deref [`ok_expect`]: https://github.com/Manishearth/rust-clippy/wiki#ok_expect +[`op_ref`]: https://github.com/Manishearth/rust-clippy/wiki#op_ref [`option_map_unwrap_or`]: https://github.com/Manishearth/rust-clippy/wiki#option_map_unwrap_or [`option_map_unwrap_or_else`]: https://github.com/Manishearth/rust-clippy/wiki#option_map_unwrap_or_else [`option_unwrap_used`]: https://github.com/Manishearth/rust-clippy/wiki#option_unwrap_used diff --git a/Cargo.toml b/Cargo.toml index 8ca2e988c88..dcf6f2eab87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clippy" -version = "0.0.121" +version = "0.0.122" authors = [ "Manish Goregaokar ", "Andre Bogus ", @@ -30,7 +30,7 @@ test = false [dependencies] # begin automatic update -clippy_lints = { version = "0.0.121", path = "clippy_lints" } +clippy_lints = { version = "0.0.122", path = "clippy_lints" } # end automatic update cargo_metadata = "0.1.1" diff --git a/README.md b/README.md index 1cfc1fafea2..9058c901d19 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ transparently: ## Lints -There are 196 lints included in this crate: +There are 197 lints included in this crate: name | default | triggers on -----------------------------------------------------------------------------------------------------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------- @@ -304,6 +304,7 @@ name [nonsensical_open_options](https://github.com/Manishearth/rust-clippy/wiki#nonsensical_open_options) | warn | nonsensical combination of options for opening a file [not_unsafe_ptr_arg_deref](https://github.com/Manishearth/rust-clippy/wiki#not_unsafe_ptr_arg_deref) | warn | public functions dereferencing raw pointer arguments but not marked `unsafe` [ok_expect](https://github.com/Manishearth/rust-clippy/wiki#ok_expect) | warn | using `ok().expect()`, which gives worse error messages than calling `expect` directly on the Result +[op_ref](https://github.com/Manishearth/rust-clippy/wiki#op_ref) | warn | taking a reference to satisfy the type constraints on `==` [option_map_unwrap_or](https://github.com/Manishearth/rust-clippy/wiki#option_map_unwrap_or) | allow | using `Option.map(f).unwrap_or(a)`, which is more succinctly expressed as `map_or(a, f)` [option_map_unwrap_or_else](https://github.com/Manishearth/rust-clippy/wiki#option_map_unwrap_or_else) | allow | using `Option.map(f).unwrap_or_else(g)`, which is more succinctly expressed as `map_or_else(g, f)` [option_unwrap_used](https://github.com/Manishearth/rust-clippy/wiki#option_unwrap_used) | allow | using `Option.unwrap()`, which should at least get a better message using `expect()` diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index 8a710bf6291..18db178de18 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "clippy_lints" # begin automatic update -version = "0.0.121" +version = "0.0.122" # end automatic update authors = [ "Manish Goregaokar ", diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 068bc5d2e17..f84b023c3d8 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -383,6 +383,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) { enum_variants::ENUM_VARIANT_NAMES, enum_variants::MODULE_INCEPTION, eq_op::EQ_OP, + eq_op::OP_REF, escape::BOXED_LOCAL, eta_reduction::REDUNDANT_CLOSURE, eval_order_dependence::DIVERGING_SUB_EXPRESSION,