From 49e3419b87eb086ec2ef3133163efdec5af3733d Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 21 Dec 2016 12:50:39 +0100 Subject: [PATCH] shorten deprecated lints line length --- clippy_lints/src/lib.rs | 20 ++++++++++++++++---- util/update_lints.py | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 053be5d4c26..3641b476c5f 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -173,10 +173,22 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) { }; let mut store = reg.sess.lint_store.borrow_mut(); - store.register_removed("unstable_as_slice", "`Vec::as_slice` has been stabilized in 1.7"); - store.register_removed("unstable_as_mut_slice", "`Vec::as_mut_slice` has been stabilized in 1.7"); - store.register_removed("str_to_string", "using `str::to_string` is common even today and specialization will likely happen soon"); - store.register_removed("string_to_string", "using `string::to_string` is common even today and specialization will likely happen soon"); + store.register_removed( + "unstable_as_slice", + "`Vec::as_slice` has been stabilized in 1.7", + ); + store.register_removed( + "unstable_as_mut_slice", + "`Vec::as_mut_slice` has been stabilized in 1.7", + ); + store.register_removed( + "str_to_string", + "using `str::to_string` is common even today and specialization will likely happen soon", + ); + store.register_removed( + "string_to_string", + "using `string::to_string` is common even today and specialization will likely happen soon", + ); // end deprecated lints, do not remove this comment, it’s used in `update_lints` reg.register_late_lint_pass(box serde::Serde); diff --git a/util/update_lints.py b/util/update_lints.py index 965d7e272c5..b32cdce2cd0 100755 --- a/util/update_lints.py +++ b/util/update_lints.py @@ -98,7 +98,7 @@ def gen_deprecated(lints): """Declare deprecated lints""" for lint in lints: - yield ' store.register_removed("%s", "%s");\n' % (lint[1], lint[2]) + yield ' store.register_removed(\n "%s",\n "%s",\n );\n' % (lint[1], lint[2]) def replace_region(fn, region_start, region_end, callback,