From 744368d83d6fbbe6eefe9bba5283f3ce962391b4 Mon Sep 17 00:00:00 2001 From: Boxy Date: Sat, 18 Jan 2025 22:51:27 +0000 Subject: [PATCH] writeback comment --- compiler/rustc_hir_typeck/src/writeback.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_hir_typeck/src/writeback.rs b/compiler/rustc_hir_typeck/src/writeback.rs index 1d7394fc500a..1bf5b19d68d0 100644 --- a/compiler/rustc_hir_typeck/src/writeback.rs +++ b/compiler/rustc_hir_typeck/src/writeback.rs @@ -371,7 +371,9 @@ impl<'cx, 'tcx> Visitor<'tcx> for WritebackCx<'cx, 'tcx> { ) -> Self::Result { self.visit_id(inf_id); - // Ignore cases where the inference is a const. + // We don't currently write inference results of const infer vars to + // the typeck results as there is not yet any part of the compiler that + // needs this information. if let Some(ty) = self.fcx.node_ty_opt(inf_id) { let ty = self.resolve(ty, &inf_span); self.write_ty_to_typeck_results(inf_id, ty);