Skip to content

Commit 80784f0

Browse files
Rollup merge of #135407 - joshtriplett:more-clippy, r=compiler-errors
Deny various clippy lints Almost all of these clippy lints have zero occurrences. Two of them have one each, and this PR fixes those.
2 parents d8e88c9 + af7bc31 commit 80784f0

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

+6-9
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
);

compiler/rustc_resolve/src/rustdoc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ pub fn strip_generics_from_path(path_str: &str) -> Result<Box<str>, MalformedGen
347347

348348
/// Returns whether the first doc-comment is an inner attribute.
349349
///
350-
//// If there are no doc-comments, return true.
350+
/// If there are no doc-comments, return true.
351351
/// FIXME(#78591): Support both inner and outer attributes on the same item.
352352
pub fn inner_docs(attrs: &[impl AttributeExt]) -> bool {
353353
attrs

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

+26-2
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,37 @@ impl Step for CI {
386386
let library_clippy_cfg = LintConfig {
387387
allow: vec!["clippy::all".into()],
388388
warn: vec![],
389-
deny: vec!["clippy::correctness".into()],
389+
deny: vec![
390+
"clippy::correctness".into(),
391+
"clippy::char_lit_as_u8".into(),
392+
"clippy::four_forward_slashes".into(),
393+
"clippy::needless_bool".into(),
394+
"clippy::needless_bool_assign".into(),
395+
"clippy::non_minimal_cfg".into(),
396+
"clippy::print_literal".into(),
397+
"clippy::same_item_push".into(),
398+
"clippy::single_char_add_str".into(),
399+
"clippy::to_string_in_format_args".into(),
400+
],
390401
forbid: vec![],
391402
};
392403
let compiler_clippy_cfg = LintConfig {
393404
allow: vec!["clippy::all".into()],
394405
warn: vec![],
395-
deny: vec!["clippy::correctness".into(), "clippy::clone_on_ref_ptr".into()],
406+
deny: vec![
407+
"clippy::correctness".into(),
408+
"clippy::char_lit_as_u8".into(),
409+
"clippy::clone_on_ref_ptr".into(),
410+
"clippy::format_in_format_args".into(),
411+
"clippy::four_forward_slashes".into(),
412+
"clippy::needless_bool".into(),
413+
"clippy::needless_bool_assign".into(),
414+
"clippy::non_minimal_cfg".into(),
415+
"clippy::print_literal".into(),
416+
"clippy::same_item_push".into(),
417+
"clippy::single_char_add_str".into(),
418+
"clippy::to_string_in_format_args".into(),
419+
],
396420
forbid: vec![],
397421
};
398422

0 commit comments

Comments
 (0)