From 4cebbabd5ce3fdb1444cc7efdb8e07eff52b6652 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 18 Jul 2025 16:47:39 +0000 Subject: Add implicit sized bound to trait ascription types --- compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'compiler') 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 a5bd7c1a34a..2a6ba31d5ab 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -2489,6 +2489,14 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { ty::List::empty(), PredicateFilter::All, ); + self.add_sizedness_bounds( + &mut bounds, + self_ty, + hir_bounds, + None, + None, + hir_ty.span, + ); self.register_trait_ascription_bounds(bounds, hir_ty.hir_id, hir_ty.span); self_ty } -- cgit 1.4.1-3-g733a5