diff options
| author | Philipp Krones <hello@philkrones.com> | 2023-05-05 17:45:49 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2023-05-05 17:45:49 +0200 |
| commit | 7e9abb311df2ecc61ea294f98a6eda03612178ef (patch) | |
| tree | 0df45dc80cc4509473cb8a1d49ec16be50670f1c /clippy_lints/src/methods/path_buf_push_overwrite.rs | |
| parent | 8518391e72e46d0a7886f582145793332055ab90 (diff) | |
| download | rust-7e9abb311df2ecc61ea294f98a6eda03612178ef.tar.gz rust-7e9abb311df2ecc61ea294f98a6eda03612178ef.zip | |
Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup
Diffstat (limited to 'clippy_lints/src/methods/path_buf_push_overwrite.rs')
| -rw-r--r-- | clippy_lints/src/methods/path_buf_push_overwrite.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/methods/path_buf_push_overwrite.rs b/clippy_lints/src/methods/path_buf_push_overwrite.rs index e3f2de3cd46..0284d9dea30 100644 --- a/clippy_lints/src/methods/path_buf_push_overwrite.rs +++ b/clippy_lints/src/methods/path_buf_push_overwrite.rs @@ -15,7 +15,7 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, arg: &'t if let Some(method_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id); if let Some(impl_id) = cx.tcx.impl_of_method(method_id); if is_type_diagnostic_item(cx, cx.tcx.type_of(impl_id).subst_identity(), sym::PathBuf); - if let ExprKind::Lit(ref lit) = arg.kind; + if let ExprKind::Lit(lit) = arg.kind; if let LitKind::Str(ref path_lit, _) = lit.node; if let pushed_path = Path::new(path_lit.as_str()); if let Some(pushed_path_lit) = pushed_path.to_str(); |
