Skip to content

Commit e54264c

Browse files
committed
Deny clippy::format_in_format_args and fix the only occurrence
1 parent 13f3924 commit e54264c

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,16 +2460,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
24602460
spans.push_span_label(
24612461
param.span,
24622462
format!(
2463-
"{} {} to match the {} type of this parameter",
2463+
"{} need{} to match the {} type of this parameter",
24642464
display_list_with_comma_and(&other_param_matched_names),
2465-
format!(
2466-
"need{}",
2467-
pluralize!(if other_param_matched_names.len() == 1 {
2468-
0
2469-
} else {
2470-
1
2471-
})
2472-
),
2465+
pluralize!(if other_param_matched_names.len() == 1 {
2466+
0
2467+
} else {
2468+
1
2469+
}),
24732470
matched_ty,
24742471
),
24752472
);

src/bootstrap/src/core/build_steps/clippy.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,11 @@ impl Step for CI {
391391
let compiler_clippy_cfg = LintConfig {
392392
allow: vec!["clippy::all".into()],
393393
warn: vec![],
394-
deny: vec!["clippy::correctness".into(), "clippy::clone_on_ref_ptr".into()],
394+
deny: vec![
395+
"clippy::correctness".into(),
396+
"clippy::clone_on_ref_ptr".into(),
397+
"clippy::format_in_format_args".into(),
398+
],
395399
forbid: vec![],
396400
};
397401

0 commit comments

Comments
 (0)