Skip to content

Commit fc3b52e

Browse files
committed
rename to uninlined_format-argss, mv to pedantic
1 parent 053882b commit fc3b52e

11 files changed

+83
-83
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4072,7 +4072,6 @@ Released 2018-09-13
40724072
[`needless_continue`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue
40734073
[`needless_doctest_main`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
40744074
[`needless_for_each`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_for_each
4075-
[`needless_format_args`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_format_args
40764075
[`needless_late_init`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
40774076
[`needless_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
40784077
[`needless_match`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_match
@@ -4275,6 +4274,7 @@ Released 2018-09-13
42754274
[`unimplemented`]: https://rust-lang.github.io/rust-clippy/master/index.html#unimplemented
42764275
[`uninit_assumed_init`]: https://rust-lang.github.io/rust-clippy/master/index.html#uninit_assumed_init
42774276
[`uninit_vec`]: https://rust-lang.github.io/rust-clippy/master/index.html#uninit_vec
4277+
[`uninlined_format_args`]: https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
42784278
[`unit_arg`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
42794279
[`unit_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_cmp
42804280
[`unit_hash`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_hash

clippy_lints/src/format_args.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ declare_clippy_lint! {
107107
///
108108
/// Until implemented, `print!("{0}={1}", var, 1+2)` should be changed to `print!("{var}={0}", 1+2)` by hand.
109109
#[clippy::version = "1.64.0"]
110-
pub NEEDLESS_FORMAT_ARGS,
111-
nursery,
110+
pub UNINLINED_FORMAT_ARGS,
111+
pedantic,
112112
"using non-inlined variables in `format!` calls"
113113
}
114114

115-
impl_lint_pass!(FormatArgs => [FORMAT_IN_FORMAT_ARGS, NEEDLESS_FORMAT_ARGS, TO_STRING_IN_FORMAT_ARGS]);
115+
impl_lint_pass!(FormatArgs => [FORMAT_IN_FORMAT_ARGS, UNINLINED_FORMAT_ARGS, TO_STRING_IN_FORMAT_ARGS]);
116116

117117
pub struct FormatArgs {
118118
msrv: Option<RustcVersion>,
@@ -160,7 +160,7 @@ impl<'tcx> LateLintPass<'tcx> for FormatArgs {
160160
{
161161
span_lint_and_then(
162162
cx,
163-
NEEDLESS_FORMAT_ARGS,
163+
UNINLINED_FORMAT_ARGS,
164164
outermost_expn_data.call_site,
165165
"variables can be used directly in the `format!` string",
166166
|diag| {

clippy_lints/src/lib.register_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ store.register_lints(&[
158158
floating_point_arithmetic::SUBOPTIMAL_FLOPS,
159159
format::USELESS_FORMAT,
160160
format_args::FORMAT_IN_FORMAT_ARGS,
161-
format_args::NEEDLESS_FORMAT_ARGS,
162161
format_args::TO_STRING_IN_FORMAT_ARGS,
162+
format_args::UNINLINED_FORMAT_ARGS,
163163
format_impl::PRINT_IN_FORMAT_IMPL,
164164
format_impl::RECURSIVE_FORMAT_IMPL,
165165
format_push_string::FORMAT_PUSH_STRING,

clippy_lints/src/lib.register_nursery.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
1010
LintId::of(fallible_impl_from::FALLIBLE_IMPL_FROM),
1111
LintId::of(floating_point_arithmetic::IMPRECISE_FLOPS),
1212
LintId::of(floating_point_arithmetic::SUBOPTIMAL_FLOPS),
13-
LintId::of(format_args::NEEDLESS_FORMAT_ARGS),
1413
LintId::of(future_not_send::FUTURE_NOT_SEND),
1514
LintId::of(index_refutable_slice::INDEX_REFUTABLE_SLICE),
1615
LintId::of(let_if_seq::USELESS_LET_IF_SEQ),

clippy_lints/src/lib.register_pedantic.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ 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),
3233
LintId::of(functions::MUST_USE_CANDIDATE),
3334
LintId::of(functions::TOO_MANY_LINES),
3435
LintId::of(if_not_else::IF_NOT_ELSE),

clippy_lints/src/utils/conf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ define_Conf! {
213213
///
214214
/// Suppress lints whenever the suggested change would cause breakage for other crates.
215215
(avoid_breaking_exported_api: bool = true),
216-
/// Lint: MANUAL_SPLIT_ONCE, MANUAL_STR_REPEAT, CLONED_INSTEAD_OF_COPIED, REDUNDANT_FIELD_NAMES, REDUNDANT_STATIC_LIFETIMES, FILTER_MAP_NEXT, CHECKED_CONVERSIONS, MANUAL_RANGE_CONTAINS, USE_SELF, MEM_REPLACE_WITH_DEFAULT, MANUAL_NON_EXHAUSTIVE, OPTION_AS_REF_DEREF, MAP_UNWRAP_OR, MATCH_LIKE_MATCHES_MACRO, MANUAL_STRIP, MISSING_CONST_FOR_FN, UNNESTED_OR_PATTERNS, FROM_OVER_INTO, PTR_AS_PTR, IF_THEN_SOME_ELSE_NONE, APPROX_CONSTANT, DEPRECATED_CFG_ATTR, INDEX_REFUTABLE_SLICE, MAP_CLONE, BORROW_AS_PTR, MANUAL_BITS, ERR_EXPECT, CAST_ABS_TO_UNSIGNED, NEEDLESS_FORMAT_ARGS.
216+
/// Lint: MANUAL_SPLIT_ONCE, MANUAL_STR_REPEAT, CLONED_INSTEAD_OF_COPIED, REDUNDANT_FIELD_NAMES, REDUNDANT_STATIC_LIFETIMES, FILTER_MAP_NEXT, CHECKED_CONVERSIONS, MANUAL_RANGE_CONTAINS, USE_SELF, MEM_REPLACE_WITH_DEFAULT, MANUAL_NON_EXHAUSTIVE, OPTION_AS_REF_DEREF, MAP_UNWRAP_OR, MATCH_LIKE_MATCHES_MACRO, MANUAL_STRIP, MISSING_CONST_FOR_FN, UNNESTED_OR_PATTERNS, FROM_OVER_INTO, PTR_AS_PTR, IF_THEN_SOME_ELSE_NONE, APPROX_CONSTANT, DEPRECATED_CFG_ATTR, INDEX_REFUTABLE_SLICE, MAP_CLONE, BORROW_AS_PTR, MANUAL_BITS, ERR_EXPECT, CAST_ABS_TO_UNSIGNED, UNINLINED_FORMAT_ARGS.
217217
///
218218
/// The minimum rust version that the project supports
219219
(msrv: Option<String> = None),

src/docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ docs! {
340340
"needless_continue",
341341
"needless_doctest_main",
342342
"needless_for_each",
343-
"needless_format_args",
344343
"needless_late_init",
345344
"needless_lifetimes",
346345
"needless_match",
@@ -522,6 +521,7 @@ docs! {
522521
"unimplemented",
523522
"uninit_assumed_init",
524523
"uninit_vec",
524+
"uninlined_format_args",
525525
"unit_arg",
526526
"unit_cmp",
527527
"unit_hash",

tests/ui/needless_format_args.fixed renamed to tests/ui/uninlined_format_args.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![allow(clippy::print_literal)]
66
#![allow(named_arguments_used_positionally)]
77
#![allow(unused_variables)]
8-
#![warn(clippy::needless_format_args)]
8+
#![warn(clippy::uninlined_format_args)]
99
#![feature(custom_inner_attributes)]
1010

1111
fn tester(fn_arg: i32) {

tests/ui/needless_format_args.rs renamed to tests/ui/uninlined_format_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![allow(clippy::print_literal)]
66
#![allow(named_arguments_used_positionally)]
77
#![allow(unused_variables)]
8-
#![warn(clippy::needless_format_args)]
8+
#![warn(clippy::uninlined_format_args)]
99
#![feature(custom_inner_attributes)]
1010

1111
fn tester(fn_arg: i32) {

0 commit comments

Comments
 (0)