Skip to content

Commit d063e09

Browse files
committed
Move uninlined_format_args to style
This lint was downgraded to `pedantic` in part because rust-analyzer was not fully supporting it at the time per rust-lang#10087. The support has been added over [a year ago](rust-lang/rust-analyzer#11260), so seems like this should be back to style. Another source of the initial frustration was fixed since then as well - this lint does not trigger by default in case only some arguments can be inlined.
1 parent 1d89038 commit d063e09

19 files changed

+20
-18
lines changed

tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![deny(clippy::index_refutable_slice)]
2-
2+
#![allow(clippy::uninlined_format_args)]
33
fn below_limit() {
44
let slice: Option<&[u32]> = Some(&[1, 2, 3]);
55
if let Some([_, _, _, _, _, _, _, slice_7, ..]) = slice {

tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![deny(clippy::index_refutable_slice)]
2-
2+
#![allow(clippy::uninlined_format_args)]
33
fn below_limit() {
44
let slice: Option<&[u32]> = Some(&[1, 2, 3]);
55
if let Some(slice) = slice {

tests/ui/author/macro_in_closure.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ check-pass
2+
#![allow(clippy::uninlined_format_args)]
23

34
fn main() {
45
#[clippy::author]

tests/ui/author/macro_in_loop.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ check-pass
22

33
#![feature(stmt_expr_attributes)]
4+
#![allow(clippy::uninlined_format_args)]
45

56
fn main() {
67
#[clippy::author]

tests/ui/dbg_macro/dbg_macro.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![warn(clippy::dbg_macro)]
22
#![allow(clippy::unnecessary_operation, clippy::no_effect, clippy::unit_arg)]
3-
3+
#![allow(clippy::uninlined_format_args)]
44
fn foo(n: u32) -> u32 {
55
if let Some(n) = n.checked_sub(4) { n } else { n }
66
//~^ dbg_macro

tests/ui/dbg_macro/dbg_macro.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![warn(clippy::dbg_macro)]
22
#![allow(clippy::unnecessary_operation, clippy::no_effect, clippy::unit_arg)]
3-
3+
#![allow(clippy::uninlined_format_args)]
44
fn foo(n: u32) -> u32 {
55
if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }
66
//~^ dbg_macro

tests/ui/large_futures.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![warn(clippy::large_futures)]
22
#![allow(clippy::never_loop)]
33
#![allow(clippy::future_not_send)]
4-
#![allow(clippy::manual_async_fn)]
4+
#![allow(clippy::manual_async_fn, clippy::uninlined_format_args)]
55

66
async fn big_fut(_arg: [u8; 1024 * 16]) {}
77

tests/ui/large_futures.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![warn(clippy::large_futures)]
22
#![allow(clippy::never_loop)]
33
#![allow(clippy::future_not_send)]
4-
#![allow(clippy::manual_async_fn)]
4+
#![allow(clippy::manual_async_fn, clippy::uninlined_format_args)]
55

66
async fn big_fut(_arg: [u8; 1024 * 16]) {}
77

tests/ui/manual_inspect.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::manual_inspect)]
2-
#![allow(clippy::no_effect, clippy::op_ref)]
2+
#![allow(clippy::no_effect, clippy::op_ref, clippy::uninlined_format_args)]
33

44
fn main() {
55
let _ = Some(0).inspect(|&x| {

tests/ui/manual_inspect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::manual_inspect)]
2-
#![allow(clippy::no_effect, clippy::op_ref)]
2+
#![allow(clippy::no_effect, clippy::op_ref, clippy::uninlined_format_args)]
33

44
fn main() {
55
let _ = Some(0).map(|x| {

tests/ui/needless_pass_by_ref_mut.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#![allow(
22
clippy::if_same_then_else,
33
clippy::no_effect,
4+
clippy::ptr_arg,
45
clippy::redundant_closure_call,
5-
clippy::ptr_arg
6+
clippy::uninlined_format_args
67
)]
78
#![warn(clippy::needless_pass_by_ref_mut)]
89
//@no-rustfix
910
use std::ptr::NonNull;
10-
1111
fn foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
1212
//~^ needless_pass_by_ref_mut
1313

tests/ui/to_string_in_format_args_incremental.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -C incremental=target/debug/test/incr
2-
2+
#![allow(clippy::uninlined_format_args)]
33
// see https://github.com/rust-lang/rust-clippy/issues/10969
44

55
fn main() {

tests/ui/to_string_in_format_args_incremental.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -C incremental=target/debug/test/incr
2-
2+
#![allow(clippy::uninlined_format_args)]
33
// see https://github.com/rust-lang/rust-clippy/issues/10969
44

55
fn main() {

tests/ui/unnecessary_iter_cloned.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unused_assignments)]
1+
#![allow(unused_assignments, clippy::uninlined_format_args)]
22
#![warn(clippy::unnecessary_to_owned)]
33

44
#[allow(dead_code)]

tests/ui/unnecessary_iter_cloned.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unused_assignments)]
1+
#![allow(unused_assignments, clippy::uninlined_format_args)]
22
#![warn(clippy::unnecessary_to_owned)]
33

44
#[allow(dead_code)]

tests/ui/unnecessary_operation.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
clippy::unnecessary_struct_initialization
77
)]
88
#![warn(clippy::unnecessary_operation)]
9-
9+
#![allow(clippy::uninlined_format_args)]
1010
use std::fmt::Display;
1111
use std::ops::Shl;
1212

tests/ui/unnecessary_operation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
clippy::unnecessary_struct_initialization
77
)]
88
#![warn(clippy::unnecessary_operation)]
9-
9+
#![allow(clippy::uninlined_format_args)]
1010
use std::fmt::Display;
1111
use std::ops::Shl;
1212

tests/ui/unnecessary_to_owned.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
clippy::owned_cow
88
)]
99
#![warn(clippy::unnecessary_to_owned, clippy::redundant_clone)]
10-
10+
#![allow(clippy::uninlined_format_args)]
1111
use std::borrow::Cow;
1212
use std::ffi::{CStr, CString, OsStr, OsString};
1313
use std::ops::Deref;

tests/ui/unnecessary_to_owned.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
clippy::owned_cow
88
)]
99
#![warn(clippy::unnecessary_to_owned, clippy::redundant_clone)]
10-
10+
#![allow(clippy::uninlined_format_args)]
1111
use std::borrow::Cow;
1212
use std::ffi::{CStr, CString, OsStr, OsString};
1313
use std::ops::Deref;

0 commit comments

Comments
 (0)