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/default_numeric_fallback.rs | |
| parent | 660ef4ffe8d58ba236555f7c191334b82ce5025f (diff) | |
| download | rust-fdb2e363d33e04aa306041e2c084e13c6ce489e1.tar.gz rust-fdb2e363d33e04aa306041e2c084e13c6ce489e1.zip | |
refactor(rustc_middle): Substs -> GenericArg
Diffstat (limited to 'clippy_lints/src/default_numeric_fallback.rs')
| -rw-r--r-- | clippy_lints/src/default_numeric_fallback.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_lints/src/default_numeric_fallback.rs b/clippy_lints/src/default_numeric_fallback.rs index e53a9877b20..9217edcef07 100644 --- a/clippy_lints/src/default_numeric_fallback.rs +++ b/clippy_lints/src/default_numeric_fallback.rs @@ -141,7 +141,7 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> { ExprKind::MethodCall(_, receiver, args, _) => { if let Some(def_id) = self.cx.typeck_results().type_dependent_def_id(expr.hir_id) { - let fn_sig = self.cx.tcx.fn_sig(def_id).subst_identity().skip_binder(); + let fn_sig = self.cx.tcx.fn_sig(def_id).instantiate_identity().skip_binder(); for (expr, bound) in iter::zip(std::iter::once(*receiver).chain(args.iter()), fn_sig.inputs()) { self.ty_bounds.push((*bound).into()); self.visit_expr(expr); @@ -167,7 +167,7 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> { .iter() .find_map(|f_def| { if f_def.ident(self.cx.tcx) == field.ident - { Some(self.cx.tcx.type_of(f_def.did).subst_identity()) } + { Some(self.cx.tcx.type_of(f_def.did).instantiate_identity()) } else { None } }); self.ty_bounds.push(bound.into()); @@ -213,9 +213,9 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> { fn fn_sig_opt<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<PolyFnSig<'tcx>> { let node_ty = cx.typeck_results().node_type_opt(hir_id)?; - // We can't use `Ty::fn_sig` because it automatically performs substs, this may result in FNs. + // We can't use `Ty::fn_sig` because it automatically performs args, this may result in FNs. match node_ty.kind() { - ty::FnDef(def_id, _) => Some(cx.tcx.fn_sig(*def_id).subst_identity()), + ty::FnDef(def_id, _) => Some(cx.tcx.fn_sig(*def_id).instantiate_identity()), ty::FnPtr(fn_sig) => Some(*fn_sig), _ => None, } |
