We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d471e2f commit 24c3ac1Copy full SHA for 24c3ac1
clippy_lints/src/path_from_format.rs
@@ -36,7 +36,7 @@ impl<'tcx> LateLintPass<'tcx> for PathFromFormat {
36
if let ExprKind::Call(_, ref args) = expr.kind;
37
if let ty = cx.typeck_results().expr_ty(expr);
38
if is_type_diagnostic_item(cx, ty, sym::PathBuf);
39
- if args.len() == 0;
+ if args.len() > 0;
40
if let Some(macro_def_id) = args[0].span.ctxt().outer_expn_data().macro_def_id;
41
if cx.tcx.get_diagnostic_name(macro_def_id) == Some(sym::format_macro);
42
then {
0 commit comments