diff options
| author | bors <bors@rust-lang.org> | 2025-05-09 20:37:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-09 20:37:37 +0000 |
| commit | 17067e9ac6d7ecb70e50f92c1944e545188d2359 (patch) | |
| tree | 10cdfd82bfa6bb95d7e99b7ab53d8121fc7a8913 /compiler/rustc_middle/src/ty/sty.rs | |
| parent | af91af44eb85ceac634afa72cc73be4af358b350 (diff) | |
| parent | 908c30b3e1b758d46501de460163e9761c65534f (diff) | |
| download | rust-17067e9ac6d7ecb70e50f92c1944e545188d2359.tar.gz rust-17067e9ac6d7ecb70e50f92c1944e545188d2359.zip | |
Auto merge of #140859 - pietroalbini:pa-stable, r=pietroalbini 1.87.0
[stable] Prepare the 1.87.0 release Preparing the stable artifacts as described in the release process. This PR also includes the following last minute backports: * https://github.com/rust-lang/rust/pull/140810 * https://github.com/rust-lang/rust/pull/140601 * https://github.com/rust-lang/rust/pull/140684 r? `@ghost`
Diffstat (limited to 'compiler/rustc_middle/src/ty/sty.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 74a94d82784..c7193c6f6df 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -720,7 +720,10 @@ impl<'tcx> Ty<'tcx> { repr: DynKind, ) -> Ty<'tcx> { if cfg!(debug_assertions) { - let projection_count = obj.projection_bounds().count(); + let projection_count = obj + .projection_bounds() + .filter(|item| !tcx.generics_require_sized_self(item.item_def_id())) + .count(); let expected_count: usize = obj .principal_def_id() .into_iter() |
