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:
@@ -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\",",
|
||||
" );",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user