diff options
| author | Boxy <rust@boxyuwu.dev> | 2025-01-11 18:55:32 +0000 |
|---|---|---|
| committer | Boxy <rust@boxyuwu.dev> | 2025-01-23 06:01:36 +0000 |
| commit | 7c8c6d24973a19e92f3c9822d293452c9168aef4 (patch) | |
| tree | 64b7bd94c5f68e6c8004bca0378a075e0f1dbc38 /compiler/rustc_hir_analysis/src/collect | |
| parent | 98d80e22d0013abcb0f731c86b24d8297091f7b2 (diff) | |
| download | rust-7c8c6d24973a19e92f3c9822d293452c9168aef4.tar.gz rust-7c8c6d24973a19e92f3c9822d293452c9168aef4.zip | |
Semantic changes from new hir representation
Always lower to `GenericArg::Infer` Update `PlaceholderCollector` Update closure lifetime binder infer var visitor Fallback visitor handle ambig infer args Ensure type infer args have their type recorded
Diffstat (limited to 'compiler/rustc_hir_analysis/src/collect')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs index 2fae1a23f32..1c8a7d2d0be 100644 --- a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs +++ b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs @@ -489,15 +489,17 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> { struct FindInferInClosureWithBinder; impl<'v> Visitor<'v> for FindInferInClosureWithBinder { type Result = ControlFlow<Span>; - fn visit_ty(&mut self, t: &'v hir::Ty<'v>) -> Self::Result { - if matches!(t.kind, hir::TyKind::Infer) { - ControlFlow::Break(t.span) - } else { - intravisit::walk_ty(self, t) - } + + fn visit_infer( + &mut self, + _inf_id: HirId, + inf_span: Span, + _kind: InferKind<'v>, + ) -> Self::Result { + ControlFlow::Break(inf_span) } } - FindInferInClosureWithBinder.visit_ty(ty).break_value() + FindInferInClosureWithBinder.visit_unambig_ty(ty).break_value() } let infer_in_rt_sp = match fn_decl.output { |
