Skip to content

Commit d1e1dcb

Browse files
Rename arg_iter to iter_instantiated
1 parent 2feb9a5 commit d1e1dcb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/future_not_send.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
6666
if let ty::Alias(ty::Opaque, AliasTy { def_id, args, .. }) = *ret_ty.kind() {
6767
let preds = cx.tcx.explicit_item_bounds(def_id);
6868
let mut is_future = false;
69-
for (p, _span) in preds.arg_iter_copied(cx.tcx, args) {
69+
for (p, _span) in preds.iter_instantiated_copied(cx.tcx, args) {
7070
if let Some(trait_pred) = p.as_trait_clause() {
7171
if Some(trait_pred.skip_binder().trait_ref.def_id) == cx.tcx.lang_items().future_trait() {
7272
is_future = true;

clippy_utils/src/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ pub fn ty_sig<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<ExprFnSig<'t
663663
ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) => sig_from_bounds(
664664
cx,
665665
ty,
666-
cx.tcx.item_bounds(def_id).arg_iter(cx.tcx, args),
666+
cx.tcx.item_bounds(def_id).iter_instantiated(cx.tcx, args),
667667
cx.tcx.opt_parent(def_id),
668668
),
669669
ty::FnPtr(sig) => Some(ExprFnSig::Sig(sig, None)),
@@ -739,7 +739,7 @@ fn sig_for_projection<'tcx>(cx: &LateContext<'tcx>, ty: AliasTy<'tcx>) -> Option
739739
let mut output = None;
740740
let lang_items = cx.tcx.lang_items();
741741

742-
for (pred, _) in cx.tcx.explicit_item_bounds(ty.def_id).arg_iter_copied(cx.tcx, ty.args) {
742+
for (pred, _) in cx.tcx.explicit_item_bounds(ty.def_id).iter_instantiated_copied(cx.tcx, ty.args) {
743743
match pred.kind().skip_binder() {
744744
ty::ClauseKind::Trait(p)
745745
if (lang_items.fn_trait() == Some(p.def_id())

0 commit comments

Comments
 (0)