From b50c13c578b5d2cd1fdd14ddd8e594f1f1574316 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Mon, 12 Aug 2019 07:27:01 +0200 Subject: [PATCH] Fix invalid_ref deprecation --- CHANGELOG.md | 1 + clippy_lints/src/deprecated_lints.rs | 2 +- clippy_lints/src/lib.rs | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db838a3e2..e4a1a602c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -982,6 +982,7 @@ Released 2018-09-13 [`integer_division`]: https://rust-lang.github.io/rust-clippy/master/index.html#integer_division [`into_iter_on_array`]: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array [`into_iter_on_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref +[`invalid_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_ref [`invalid_regex`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_regex [`invalid_upcast_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_upcast_comparisons [`items_after_statements`]: https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements diff --git a/clippy_lints/src/deprecated_lints.rs b/clippy_lints/src/deprecated_lints.rs index 0140cf861..4a6011042 100644 --- a/clippy_lints/src/deprecated_lints.rs +++ b/clippy_lints/src/deprecated_lints.rs @@ -118,7 +118,7 @@ declare_deprecated_lint! { /// /// **Deprecation reason:** This lint has been superseded by the warn-by-default /// `invalid_value` rustc lint. -declare_clippy_lint! { +declare_deprecated_lint! { pub INVALID_REF, "superseded by rustc lint `invalid_value`" } diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 0ac0a5304..7cf4cb8b4 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -431,6 +431,10 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) { "clippy::unsafe_vector_initialization", "the replacement suggested by this lint had substantially different behavior", ); + store.register_removed( + "clippy::invalid_ref", + "superseded by rustc lint `invalid_value`", + ); // end deprecated lints, do not remove this comment, it’s used in `update_lints` reg.register_late_lint_pass(box serde_api::SerdeAPI);