mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
Auto merge of #10343 - samueltardieu:issue-10339, r=Alexendoo
uninlined_format_args: do not inline argument with generic parameters Fix #10339 --- changelog: FP: [`uninlined_format_args`]: No longer lints for arguments with generic parameters [#10343](https://github.com/rust-lang/rust-clippy/pull/10343) <!-- changelog_checked -->
This commit is contained in:
commit
8754d5a6fb
@ -340,6 +340,7 @@ fn check_one_arg(
|
||||
if matches!(param.kind, Implicit | Starred | Named(_) | Numbered)
|
||||
&& let ExprKind::Path(QPath::Resolved(None, path)) = param.value.kind
|
||||
&& let [segment] = path.segments
|
||||
&& segment.args.is_none()
|
||||
&& let Some(arg_span) = args.value_with_prev_comma_span(param.value.hir_id)
|
||||
{
|
||||
let replacement = match param.usage {
|
||||
|
@ -174,3 +174,7 @@ fn _meets_msrv() {
|
||||
let local_i32 = 1;
|
||||
println!("expand='{local_i32}'");
|
||||
}
|
||||
|
||||
fn _do_not_fire() {
|
||||
println!("{:?}", None::<()>);
|
||||
}
|
||||
|
@ -179,3 +179,7 @@ fn _meets_msrv() {
|
||||
let local_i32 = 1;
|
||||
println!("expand='{}'", local_i32);
|
||||
}
|
||||
|
||||
fn _do_not_fire() {
|
||||
println!("{:?}", None::<()>);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user