uninlined_format_args: do not inline argument with generic parameters
This commit is contained in:
parent
0e40f94a86
commit
75aa2b9ec8
@ -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