diff --git a/compiler/rustc_hir_analysis/src/collect/type_of.rs b/compiler/rustc_hir_analysis/src/collect/type_of.rs index 68b7d50c2ee9b..3402f56bef6dc 100644 --- a/compiler/rustc_hir_analysis/src/collect/type_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/type_of.rs @@ -63,13 +63,26 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<'_ let icx = ItemCtxt::new(tcx, def_id); + let new_bound_fn_def = |hir: HirId, did| { + let args = ty::GenericArgs::identity_for_item(tcx, def_id); + Ty::new_fn_def( + tcx, + did, + match &tcx + .late_bound_vars_map(hir.owner) + .get(&hir.local_id) + .cloned() + .map(|x| tcx.mk_bound_variable_kinds(&x)) + { + Some(late_bound) => ty::Binder::bind_with_vars(args, late_bound), + None => ty::Binder::dummy(args), + }, + ) + }; + let output = match tcx.hir_node(hir_id) { Node::TraitItem(item) => match item.kind { - TraitItemKind::Fn(..) => { - let args = ty::GenericArgs::identity_for_item(tcx, def_id); - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) - Ty::new_fn_def(tcx, def_id.to_def_id(), ty::Binder::dummy(args)) - } + TraitItemKind::Fn(_, _) => new_bound_fn_def(item.hir_id(), def_id.to_def_id()), TraitItemKind::Const(ty, rhs) => rhs .and_then(|rhs| { ty.is_suggestable_infer_ty().then(|| { @@ -92,11 +105,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<'_ }, Node::ImplItem(item) => match item.kind { - ImplItemKind::Fn(..) => { - let args = ty::GenericArgs::identity_for_item(tcx, def_id); - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) - Ty::new_fn_def(tcx, def_id.to_def_id(), ty::Binder::dummy(args)) - } + ImplItemKind::Fn(_, _) => new_bound_fn_def(item.hir_id(), def_id.to_def_id()), ImplItemKind::Const(ty, rhs) => { if ty.is_suggestable_infer_ty() { infer_placeholder_type( @@ -171,11 +180,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<'_ } _ => icx.lower_ty(self_ty), }, - ItemKind::Fn { .. } => { - let args = ty::GenericArgs::identity_for_item(tcx, def_id); - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) - Ty::new_fn_def(tcx, def_id.to_def_id(), ty::Binder::dummy(args)) - } + ItemKind::Fn { .. } => new_bound_fn_def(item.hir_id(), def_id.to_def_id()), ItemKind::Enum(..) | ItemKind::Struct(..) | ItemKind::Union(..) => { let def = tcx.adt_def(def_id); let args = ty::GenericArgs::identity_for_item(tcx, def_id); @@ -196,10 +201,8 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<'_ Node::OpaqueTy(..) => tcx.type_of_opaque(def_id).instantiate_identity().skip_norm_wip(), Node::ForeignItem(foreign_item) => match foreign_item.kind { - ForeignItemKind::Fn(..) => { - let args = ty::GenericArgs::identity_for_item(tcx, def_id); - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) - Ty::new_fn_def(tcx, def_id.to_def_id(), ty::Binder::dummy(args)) + ForeignItemKind::Fn(_, _, _generics) => { + new_bound_fn_def(foreign_item.hir_id(), def_id.to_def_id()) } ForeignItemKind::Static(ty, _, _) => { let ty = icx.lower_ty(ty); @@ -219,11 +222,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<'_ VariantData::Unit(..) | VariantData::Struct { .. } => { tcx.type_of(tcx.hir_get_parent_item(hir_id)).instantiate_identity().skip_norm_wip() } - VariantData::Tuple(_, _, ctor) => { - let args = ty::GenericArgs::identity_for_item(tcx, def_id); - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) - Ty::new_fn_def(tcx, ctor.to_def_id(), ty::Binder::dummy(args)) - } + VariantData::Tuple(_, hir_id, ctor) => new_bound_fn_def(*hir_id, ctor.to_def_id()), }, Node::Field(field) => icx.lower_ty(field.ty), diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs index aea2226815ce4..fa3dca042ba0c 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -1483,13 +1483,10 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { Ok(ct) } TypeRelativePath::Ctor { ctor_def_id, args } => match tcx.def_kind(ctor_def_id) { - DefKind::Ctor(_, CtorKind::Fn) => { - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) - Ok(ty::Const::zero_sized( - tcx, - tcx.type_of(ctor_def_id).instantiate(tcx, args).skip_norm_wip(), - )) - } + DefKind::Ctor(_, CtorKind::Fn) => Ok(ty::Const::zero_sized( + tcx, + tcx.type_of(ctor_def_id).instantiate(tcx, args).skip_norm_wip(), + )), DefKind::Ctor(ctor_of, CtorKind::Const) => { Ok(self.construct_const_ctor_value(ctor_def_id, ctor_of, args)) } diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 6038684f14def..ca106213f03d1 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -736,7 +736,6 @@ impl<'tcx> Ty<'tcx> { tcx.def_kind(def_id), DefKind::AssocFn | DefKind::Fn | DefKind::Ctor(_, CtorKind::Fn) ); - // FIXME(156581): check that the binder is being used correctly (turbofishing/fndef changes) let args = args.map_bound(|args| tcx.check_and_mk_args(def_id, args)); Ty::new(tcx, FnDef(def_id, args)) } diff --git a/compiler/rustc_mir_build/src/builder/expr/into.rs b/compiler/rustc_mir_build/src/builder/expr/into.rs index 41882f6344ea6..bdf45e0c85cb5 100644 --- a/compiler/rustc_mir_build/src/builder/expr/into.rs +++ b/compiler/rustc_mir_build/src/builder/expr/into.rs @@ -532,7 +532,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { let success = this.cfg.start_new_block(); let clone_trait = this.tcx.require_lang_item(LangItem::Clone, span); let clone_fn = this.tcx.associated_item_def_ids(clone_trait)[0]; - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) let func = Operand::function_handle(this.tcx, clone_fn, &[ty.into()], expr_span); let ref_ty = Ty::new_imm_ref(this.tcx, this.tcx.lifetimes.re_erased, ty); diff --git a/compiler/rustc_mir_transform/src/elaborate_drop.rs b/compiler/rustc_mir_transform/src/elaborate_drop.rs index c200e57e69cb3..68787c63bb763 100644 --- a/compiler/rustc_mir_transform/src/elaborate_drop.rs +++ b/compiler/rustc_mir_transform/src/elaborate_drop.rs @@ -247,11 +247,19 @@ where // Resolving async_drop_in_place function for drop_ty tcx.require_lang_item(LangItem::AsyncDropInPlace, span) }; + let async_drop_fn_sig = tcx.fn_sig(async_drop_fn_def_id); let fut_ty = tcx .instantiate_bound_regions_with_erased( - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) - Ty::new_fn_def(tcx, async_drop_fn_def_id, ty::Binder::dummy([drop_ty])).fn_sig(tcx), + Ty::new_fn_def( + tcx, + async_drop_fn_def_id, + async_drop_fn_sig + .instantiate(tcx, &[drop_ty.into()]) + .skip_norm_wip() + .rebind([drop_ty]), + ) + .fn_sig(tcx), ) .output(); let fut = self.new_temp(fut_ty); @@ -373,7 +381,6 @@ where unwind_with_dead, vec![self.storage_live(fut)], TerminatorKind::Call { - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) func: Operand::function_handle(tcx, async_drop_fn_def_id, &[drop_ty.into()], span), args: [dummy_spanned(drop_arg)].into(), destination: fut.into(), @@ -402,7 +409,6 @@ where func: Operand::function_handle( tcx, pin_obj_new_unchecked_fn, - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) &[obj_ref_ty.into()], span, ), @@ -568,7 +574,6 @@ where unwind, Vec::new(), TerminatorKind::Call { - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) func: Operand::function_handle(tcx, poll_fn, &[fut_ty.into()], source_info.span), args: [ dummy_spanned(Operand::Move(fut_pin_local.into())), @@ -598,7 +603,6 @@ where func: Operand::function_handle( tcx, get_context_fn, - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) &[tcx.lifetimes.re_erased.into(), tcx.lifetimes.re_erased.into()], source_info.span, ), @@ -1252,7 +1256,6 @@ where ), )], TerminatorKind::Call { - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) func: Operand::function_handle(tcx, drop_fn, &[ty.into()], self.source_info.span), args: [dummy_spanned(Operand::Move(Place::from(ref_place)))].into(), destination: unit_temp, diff --git a/compiler/rustc_mir_transform/src/shim.rs b/compiler/rustc_mir_transform/src/shim.rs index da158bd6a44d9..bbe36166686d5 100644 --- a/compiler/rustc_mir_transform/src/shim.rs +++ b/compiler/rustc_mir_transform/src/shim.rs @@ -325,7 +325,6 @@ pub fn build_drop_shim<'tcx>( start.terminator = Some(Terminator { source_info, kind: TerminatorKind::Call { - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) func: Operand::function_handle( tcx, def_id, @@ -622,7 +621,6 @@ impl<'tcx> CloneShimBuilder<'tcx> { let tcx = self.tcx; // `func == Clone::clone(&ty) -> ty` - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) let func_ty = tcx.type_of(self.def_id).instantiate(tcx, &[ty.into()]).skip_norm_wip(); let func = Operand::Constant(Box::new(ConstOperand { span: self.span, diff --git a/compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs b/compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs index ad46b179bfed2..be1a7e1419a29 100644 --- a/compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs +++ b/compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs @@ -370,7 +370,6 @@ fn build_adrop_for_adrop_shim<'tcx>( Some(Terminator { source_info, kind: TerminatorKind::Call { - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) func: Operand::function_handle(tcx, pin_fn, &[cor_ref.into()], span), args: [dummy_spanned(Operand::Move(cor_ref_place))].into(), destination: cor_pin_place, @@ -392,7 +391,6 @@ fn build_adrop_for_adrop_shim<'tcx>( Some(Terminator { source_info, kind: TerminatorKind::Call { - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) func: Operand::function_handle(tcx, poll_fn, &[impl_ty.into()], span), args: [ dummy_spanned(Operand::Move(cor_pin_place)), diff --git a/compiler/rustc_next_trait_solver/src/canonical/mod.rs b/compiler/rustc_next_trait_solver/src/canonical/mod.rs index 1e4e3a90f9c4a..560bb15a4db30 100644 --- a/compiler/rustc_next_trait_solver/src/canonical/mod.rs +++ b/compiler/rustc_next_trait_solver/src/canonical/mod.rs @@ -294,6 +294,7 @@ where relate_args_invariantly(self, a_args, b_args)?; Ok(a_ty) } + fn relate_with_variance>( &mut self, _variance: ty::Variance, diff --git a/compiler/rustc_type_ir/src/relate.rs b/compiler/rustc_type_ir/src/relate.rs index fa2e6154ce4f2..d263a0cca9a1e 100644 --- a/compiler/rustc_type_ir/src/relate.rs +++ b/compiler/rustc_type_ir/src/relate.rs @@ -66,8 +66,8 @@ pub trait TypeRelation: Sized { a_ty: I::Ty, b_ty: I::Ty, ty_def_id: I::DefId, - a_arg: I::GenericArgs, - b_arg: I::GenericArgs, + a_args: I::GenericArgs, + b_args: I::GenericArgs, mk: impl FnOnce(I::GenericArgs) -> I::Ty, ) -> RelateResult; @@ -503,12 +503,15 @@ pub fn structurally_relate_tys>( if a_args.skip_binder().is_empty() { Ok(a) } else { - let a_args = a_args.no_bound_vars().unwrap(); - let b_args = b_args.no_bound_vars().unwrap(); - relation.relate_ty_args(a, b, a_def_id.into(), a_args, b_args, |args| { - // FIXME(156581): actually instantiate the binder correctly (turbofishing/fndef changes) - Ty::new_fn_def(cx, a_def_id, ty::Binder::dummy(args)) - }) + let x = relation.relate_ty_args( + a, + b, + a_def_id.into(), + a_args.skip_binder(), + b_args.skip_binder(), + |args| Ty::new_fn_def(cx, a_def_id, a_args.rebind(args)), + ); + x } } diff --git a/compiler/rustc_type_ir/src/relate/solver_relating.rs b/compiler/rustc_type_ir/src/relate/solver_relating.rs index 930eaa965dfcf..d22f1bf038a7f 100644 --- a/compiler/rustc_type_ir/src/relate/solver_relating.rs +++ b/compiler/rustc_type_ir/src/relate/solver_relating.rs @@ -124,6 +124,7 @@ where combine_ty_args(self.infcx, self, a_ty, b_ty, variances, a_args, b_args, |_| a_ty) } } + fn relate_with_variance>( &mut self, variance: ty::Variance, diff --git a/src/tools/clippy/clippy_lints/src/casts/confusing_method_to_numeric_cast.rs b/src/tools/clippy/clippy_lints/src/casts/confusing_method_to_numeric_cast.rs index 740326d2f9420..93a08d3a12d49 100644 --- a/src/tools/clippy/clippy_lints/src/casts/confusing_method_to_numeric_cast.rs +++ b/src/tools/clippy/clippy_lints/src/casts/confusing_method_to_numeric_cast.rs @@ -65,8 +65,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>, if let ty::FnDef(def_id, generics) = cast_from.kind() && let Some(method_name) = cx.tcx.opt_item_name(*def_id) - && let Some((const_name, ty_name)) = - get_const_name_and_ty_name(cx, method_name, *def_id, generics.no_bound_vars().unwrap().as_slice()) + && let Some((const_name, ty_name)) = get_const_name_and_ty_name(cx, method_name, *def_id, generics.no_bound_vars().unwrap().as_slice()) { let mut applicability = Applicability::MaybeIncorrect; let from_snippet = snippet_with_applicability(cx, cast_expr.span, "..", &mut applicability); diff --git a/tests/incremental/hashes/function_interfaces.rs b/tests/incremental/hashes/function_interfaces.rs index 229d515ffdd18..8847c6a69bb79 100644 --- a/tests/incremental/hashes/function_interfaces.rs +++ b/tests/incremental/hashes/function_interfaces.rs @@ -156,9 +156,9 @@ pub fn type_parameter() {} pub fn lifetime_parameter () {} #[cfg(not(any(bpass1,bpass4)))] -#[rustc_clean(cfg = "bpass2", except = "hir_owner, generics_of,fn_sig")] +#[rustc_clean(cfg = "bpass2", except = "hir_owner, generics_of, fn_sig, type_of")] #[rustc_clean(cfg = "bpass3")] -#[rustc_clean(cfg = "bpass5", except = "hir_owner, generics_of,fn_sig")] +#[rustc_clean(cfg = "bpass5", except = "hir_owner, generics_of, fn_sig, type_of")] #[rustc_clean(cfg = "bpass6")] pub fn lifetime_parameter<'a>() {} diff --git a/tests/incremental/hashes/inherent_impls.rs b/tests/incremental/hashes/inherent_impls.rs index ade4554372cc1..e2261f779a2e8 100644 --- a/tests/incremental/hashes/inherent_impls.rs +++ b/tests/incremental/hashes/inherent_impls.rs @@ -146,12 +146,12 @@ impl Foo { impl Foo { #[rustc_clean( cfg="bpass2", - except="hir_owner,fn_sig,generics_of,typeck_root,associated_item,optimized_mir", + except="hir_owner,fn_sig,type_of,generics_of,typeck_root,associated_item,optimized_mir", )] #[rustc_clean(cfg="bpass3")] #[rustc_clean( cfg="bpass5", - except="hir_owner,fn_sig,generics_of,typeck_root,associated_item,optimized_mir", + except="hir_owner,fn_sig,type_of,generics_of,typeck_root,associated_item,optimized_mir", )] #[rustc_clean(cfg="bpass6")] pub fn method_selfness(&self) { } @@ -421,9 +421,9 @@ impl Foo { // ---------------------------------------------------------- // ----------------------------------------------------------- // ---------------------------------------------------------- - // -------------------------------------------------------------- + // ---------------------------------------------------------------------- // ------------------------- - // -------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------- // ------------------------- pub fn add_lifetime_parameter_to_method (&self) { } } @@ -443,9 +443,9 @@ impl Foo { // if we lower generics before the body, then the `HirId` for // things in the body will be affected. So if you start to see // `typeck_root` appear dirty, that might be the cause. -nmatsakis - #[rustc_clean(cfg="bpass2", except="hir_owner,fn_sig")] + #[rustc_clean(cfg="bpass2", except="hir_owner,fn_sig,type_of")] #[rustc_clean(cfg="bpass3")] - #[rustc_clean(cfg="bpass5", except="hir_owner,fn_sig,generics_of")] + #[rustc_clean(cfg="bpass5", except="hir_owner,fn_sig,type_of,generics_of")] #[rustc_clean(cfg="bpass6")] pub fn add_lifetime_parameter_to_method<'a>(&self) { } } diff --git a/tests/incremental/hashes/trait_defs.rs b/tests/incremental/hashes/trait_defs.rs index 3c6021105e893..f9c1be94d5e30 100644 --- a/tests/incremental/hashes/trait_defs.rs +++ b/tests/incremental/hashes/trait_defs.rs @@ -380,9 +380,9 @@ trait TraitChangeModeSelfOwnToRef { #[rustc_clean(except="hir_owner,clauses_of", cfg="bpass5")] #[rustc_clean(cfg="bpass6")] trait TraitChangeModeSelfOwnToRef { - #[rustc_clean(except="hir_owner,fn_sig,generics_of", cfg="bpass2")] + #[rustc_clean(except="hir_owner,fn_sig,type_of,generics_of", cfg="bpass2")] #[rustc_clean(cfg="bpass3")] - #[rustc_clean(except="hir_owner,fn_sig,generics_of", cfg="bpass5")] + #[rustc_clean(except="hir_owner,fn_sig,type_of,generics_of", cfg="bpass5")] #[rustc_clean(cfg="bpass6")] fn method(&self); } @@ -509,9 +509,9 @@ trait TraitAddLifetimeParameterToMethod { #[rustc_clean(except="hir_owner,clauses_of", cfg="bpass5")] #[rustc_clean(cfg="bpass6")] trait TraitAddLifetimeParameterToMethod { - #[rustc_clean(except="hir_owner,fn_sig,generics_of", cfg="bpass2")] + #[rustc_clean(except="hir_owner,fn_sig,type_of,generics_of", cfg="bpass2")] #[rustc_clean(cfg="bpass3")] - #[rustc_clean(except="hir_owner,fn_sig,generics_of", cfg="bpass5")] + #[rustc_clean(except="hir_owner,fn_sig,type_of,generics_of", cfg="bpass5")] #[rustc_clean(cfg="bpass6")] fn method<'a>(); } diff --git a/tests/incremental/hashes/trait_impls.rs b/tests/incremental/hashes/trait_impls.rs index 989cae1939622..9698ec0473c4b 100644 --- a/tests/incremental/hashes/trait_impls.rs +++ b/tests/incremental/hashes/trait_impls.rs @@ -148,12 +148,12 @@ pub trait ChangeMethodSelfnessTrait { #[rustc_clean(cfg="bpass6")] impl ChangeMethodSelfnessTrait for Foo { #[rustc_clean( - except="hir_owner,associated_item,generics_of,fn_sig,typeck_root,optimized_mir", + except="hir_owner,associated_item,generics_of,fn_sig,type_of,typeck_root,optimized_mir", cfg="bpass2", )] #[rustc_clean(cfg="bpass3")] #[rustc_clean( - except="hir_owner,associated_item,generics_of,fn_sig,typeck_root,optimized_mir", + except="hir_owner,associated_item,generics_of,fn_sig,type_of,typeck_root,optimized_mir", cfg="bpass5", )] #[rustc_clean(cfg="bpass6")] @@ -186,12 +186,12 @@ pub trait RemoveMethodSelfnessTrait { #[rustc_clean(cfg="bpass6")] impl RemoveMethodSelfnessTrait for Foo { #[rustc_clean( - except="hir_owner,associated_item,generics_of,fn_sig,typeck_root,optimized_mir", + except="hir_owner,associated_item,generics_of,fn_sig,type_of,typeck_root,optimized_mir", cfg="bpass2", )] #[rustc_clean(cfg="bpass3")] #[rustc_clean( - except="hir_owner,associated_item,generics_of,fn_sig,typeck_root,optimized_mir", + except="hir_owner,associated_item,generics_of,fn_sig,type_of,typeck_root,optimized_mir", cfg="bpass5", )] #[rustc_clean(cfg="bpass6")] diff --git a/tests/ui/thir-print/thir-tree-match-for.stdout b/tests/ui/thir-print/thir-tree-match-for.stdout index 0cf759c40c4ff..9d8f1677fe62f 100644 --- a/tests/ui/thir-print/thir-tree-match-for.stdout +++ b/tests/ui/thir-print/thir-tree-match-for.stdout @@ -560,12 +560,12 @@ body: span: $DIR/thir-tree-match-for.rs:16:12: 16:16 (#7) kind: Call { - ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [] }) + ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [Region(BrNamed(DefId(N:M ~ core::iter::traits::iterator::Iterator::next::'_)))] }) from_hir_call: true fn_span: $DIR/thir-tree-match-for.rs:16:12: 16:16 (#7) fun: Expr { - ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [] }) + ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [Region(BrNamed(DefId(N:M ~ core::iter::traits::iterator::Iterator::next::'_)))] }) temp_scope_id: 34 span: $DIR/thir-tree-match-for.rs:16:12: 16:16 (#7) kind: @@ -574,7 +574,7 @@ body: hir_id: HirId(DefId(N:M ~ thir_tree_match_for::match_from_for).34) value: Expr { - ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [] }) + ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [Region(BrNamed(DefId(N:M ~ core::iter::traits::iterator::Iterator::next::'_)))] }) temp_scope_id: 34 span: $DIR/thir-tree-match-for.rs:16:12: 16:16 (#7) kind: @@ -1117,12 +1117,12 @@ body: span: $DIR/thir-tree-match-for.rs:25:13: 25:38 (#0) kind: Call { - ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [] }) + ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [Region(BrNamed(DefId(N:M ~ core::iter::traits::iterator::Iterator::next::'_)))] }) from_hir_call: true fn_span: $DIR/thir-tree-match-for.rs:25:13: 25:38 (#0) fun: Expr { - ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [] }) + ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [Region(BrNamed(DefId(N:M ~ core::iter::traits::iterator::Iterator::next::'_)))] }) temp_scope_id: 25 span: $DIR/thir-tree-match-for.rs:25:13: 25:27 (#0) kind: @@ -1131,7 +1131,7 @@ body: hir_id: HirId(DefId(N:M ~ thir_tree_match_for::match_loop_nonfor).25) value: Expr { - ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [] }) + ty: FnDef(DefId(N:M ~ core::iter::traits::iterator::Iterator::next), Binder { value: [std::ops::Range], bound_vars: [Region(BrNamed(DefId(N:M ~ core::iter::traits::iterator::Iterator::next::'_)))] }) temp_scope_id: 25 span: $DIR/thir-tree-match-for.rs:25:13: 25:27 (#0) kind: