shorten deprecated lints line length

This commit is contained in:
Oliver Schneider 2016-12-21 12:50:39 +01:00
parent 53fc09ec46
commit 49e3419b87
No known key found for this signature in database
GPG Key ID: 56D6EEA0FC67AC46
2 changed files with 17 additions and 5 deletions

View File

@ -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, its used in `update_lints`
reg.register_late_lint_pass(box serde::Serde);

View File

@ -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,