1
Fork 0

Fix formatting for removed lints

- Don't add backticks for the reason a lint was removed. This is almost
never a code block, and when it is the backticks should be in the reason
itself.
- Don't assume clippy is the only tool that needs to be checked for
backwards compatibility
This commit is contained in:
Joshua Nelson 2021-01-17 14:23:25 -05:00
parent 1f0fc02cc8
commit 77b5ced3aa
8 changed files with 41 additions and 42 deletions

View file

@ -387,7 +387,7 @@ impl LintStore {
Some(new_name.to_owned()),
),
Some(&Removed(ref reason)) => CheckLintNameResult::Warning(
format!("lint `{}` has been removed: `{}`", complete_name, reason),
format!("lint `{}` has been removed: {}", complete_name, reason),
None,
),
None => match self.lint_groups.get(&*complete_name) {

View file

@ -311,8 +311,7 @@ impl<'s> LintLevelsBuilder<'s> {
|lint| {
let msg = format!(
"lint name `{}` is deprecated \
and may not have an effect in the future. \
Also `cfg_attr(cargo-clippy)` won't be necessary anymore",
and may not have an effect in the future.",
name
);
lint.build(&msg)