Skip to content

Commit 58ef56e

Browse files
committed
Auto merge of #9600 - nyurik:inline-fmt-style, r=llogiq
Change uninlined_format_args into a style lint As [previously discussed](#9233 (comment)), the `uninlined_format_args` should probably be a part of the default style because `println!("{}", foo)` is not as concise or easy to understand as `println!("{foo}")` changelog: [`uninlined_format_args`]: change to be the default `style`
2 parents 42bdfa2 + 4936848 commit 58ef56e

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

clippy_lints/src/format_args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ declare_clippy_lint! {
113113
/// nothing will be suggested, e.g. `println!("{0}={1}", var, 1+2)`.
114114
#[clippy::version = "1.65.0"]
115115
pub UNINLINED_FORMAT_ARGS,
116-
pedantic,
116+
style,
117117
"using non-inlined variables in `format!` calls"
118118
}
119119

clippy_lints/src/lib.register_all.rs

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
7272
LintId::of(format::USELESS_FORMAT),
7373
LintId::of(format_args::FORMAT_IN_FORMAT_ARGS),
7474
LintId::of(format_args::TO_STRING_IN_FORMAT_ARGS),
75+
LintId::of(format_args::UNINLINED_FORMAT_ARGS),
7576
LintId::of(format_impl::PRINT_IN_FORMAT_IMPL),
7677
LintId::of(format_impl::RECURSIVE_FORMAT_IMPL),
7778
LintId::of(formatting::POSSIBLE_MISSING_COMMA),

clippy_lints/src/lib.register_pedantic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
2929
LintId::of(eta_reduction::REDUNDANT_CLOSURE_FOR_METHOD_CALLS),
3030
LintId::of(excessive_bools::FN_PARAMS_EXCESSIVE_BOOLS),
3131
LintId::of(excessive_bools::STRUCT_EXCESSIVE_BOOLS),
32-
LintId::of(format_args::UNINLINED_FORMAT_ARGS),
3332
LintId::of(functions::MUST_USE_CANDIDATE),
3433
LintId::of(functions::TOO_MANY_LINES),
3534
LintId::of(if_not_else::IF_NOT_ELSE),

clippy_lints/src/lib.register_style.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ store.register_group(true, "clippy::style", Some("clippy_style"), vec![
2525
LintId::of(enum_variants::MODULE_INCEPTION),
2626
LintId::of(eta_reduction::REDUNDANT_CLOSURE),
2727
LintId::of(float_literal::EXCESSIVE_PRECISION),
28+
LintId::of(format_args::UNINLINED_FORMAT_ARGS),
2829
LintId::of(from_over_into::FROM_OVER_INTO),
2930
LintId::of(from_str_radix_10::FROM_STR_RADIX_10),
3031
LintId::of(functions::DOUBLE_MUST_USE),

0 commit comments

Comments
 (0)