Update lint deprecation for tool lints

Our lint deprecation previously didn't work for tool lints, because
`register_removed` was registering lints to be removed _without_ the
`clippy` prefix.
This commit is contained in:
Philipp Hansch
2019-08-09 07:50:25 +02:00
parent c154754b74
commit 5114050839
4 changed files with 38 additions and 37 deletions

View File

@@ -126,7 +126,7 @@ pub fn gen_deprecated(lints: &[Lint]) -> Vec<String> {
l.clone().deprecation.and_then(|depr_text| {
Some(vec![
" store.register_removed(".to_string(),
format!(" \"{}\",", l.name),
format!(" \"clippy::{}\",", l.name),
format!(" \"{}\",", depr_text),
" );".to_string(),
])
@@ -442,11 +442,11 @@ fn test_gen_deprecated() {
];
let expected: Vec<String> = vec![
" store.register_removed(",
" \"should_assert_eq\",",
" \"clippy::should_assert_eq\",",
" \"has been superseded by should_assert_eq2\",",
" );",
" store.register_removed(",
" \"another_deprecated\",",
" \"clippy::another_deprecated\",",
" \"will be removed\",",
" );",
]