Skip to content

Commit

Permalink
Update path_from_format.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
merelymyself committed May 25, 2022
1 parent 155fccd commit 43a5c2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/path_from_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl<'tcx> LateLintPass<'tcx> for PathFromFormat {
if let ExprKind::Call(_, ref args) = expr.kind;
if let ty = cx.typeck_results().expr_ty(expr);
if is_type_diagnostic_item(cx, ty, sym::PathBuf);
if args.len() == 0;
if args.len() > 0;
if let Some(macro_def_id) = args[0].span.ctxt().outer_expn_data().macro_def_id;
if cx.tcx.get_diagnostic_name(macro_def_id) == Some(sym::format_macro);
then {
Expand Down

0 comments on commit 43a5c2e

Please sign in to comment.