diff options
| author | Mahdi Dibaiee <mdibaiee@pm.me> | 2023-07-11 22:35:29 +0100 |
|---|---|---|
| committer | Mahdi Dibaiee <mdibaiee@pm.me> | 2023-07-14 13:27:35 +0100 |
| commit | fdb2e363d33e04aa306041e2c084e13c6ce489e1 (patch) | |
| tree | cb31ee729e17f74f6a8b3617c60e419937c07ffb /clippy_lints/src/methods/map_clone.rs | |
| parent | 660ef4ffe8d58ba236555f7c191334b82ce5025f (diff) | |
| download | rust-fdb2e363d33e04aa306041e2c084e13c6ce489e1.tar.gz rust-fdb2e363d33e04aa306041e2c084e13c6ce489e1.zip | |
refactor(rustc_middle): Substs -> GenericArg
Diffstat (limited to 'clippy_lints/src/methods/map_clone.rs')
| -rw-r--r-- | clippy_lints/src/methods/map_clone.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/methods/map_clone.rs b/clippy_lints/src/methods/map_clone.rs index 2b26ef01410..880efe60c1a 100644 --- a/clippy_lints/src/methods/map_clone.rs +++ b/clippy_lints/src/methods/map_clone.rs @@ -19,7 +19,7 @@ pub(super) fn check(cx: &LateContext<'_>, e: &hir::Expr<'_>, recv: &hir::Expr<'_ if_chain! { if let Some(method_id) = cx.typeck_results().type_dependent_def_id(e.hir_id); if cx.tcx.impl_of_method(method_id) - .map_or(false, |id| is_type_diagnostic_item(cx, cx.tcx.type_of(id).subst_identity(), sym::Option)) + .map_or(false, |id| is_type_diagnostic_item(cx, cx.tcx.type_of(id).instantiate_identity(), sym::Option)) || is_diag_trait_item(cx, method_id, sym::Iterator); if let hir::ExprKind::Closure(&hir::Closure{ body, .. }) = arg.kind; then { |
