about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-07-20 08:56:09 +0200
committerGitHub <noreply@github.com>2025-07-20 08:56:09 +0200
commit23c81a75e1c64d12ec9211522828402be03747eb (patch)
tree80641f596acc7c8c1776c6ba10dc9306b12bc8d2 /compiler
parent9a927a2f03b4436fbc2371dfd50f9847420be905 (diff)
parent4cebbabd5ce3fdb1444cc7efdb8e07eff52b6652 (diff)
downloadrust-23c81a75e1c64d12ec9211522828402be03747eb.tar.gz
rust-23c81a75e1c64d12ec9211522828402be03747eb.zip
Rollup merge of #144142 - compiler-errors:itib, r=fmease
Add implicit sized bound to trait ascription types

r? ```@fmease``` or reassign

Thanks for catching this :)

Fixes rust-lang/rust#144135
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs8
1 files changed, 8 insertions, 0 deletions
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 78794cd8eb6..d7687998358 100644
--- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
+++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
@@ -2495,6 +2495,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
             }