diff options
| author | bors <bors@rust-lang.org> | 2025-08-01 21:07:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-01 21:07:49 +0000 |
| commit | 63f6845e570305a92eaf855897768617366164d6 (patch) | |
| tree | 373dbe2880f908756d25b76e9163fbb5e19f120f /compiler/rustc_hir_analysis | |
| parent | 4b55fe199cfe9c710555a5af7f2a49491ad38254 (diff) | |
| parent | e9765781b2857da90161157a3fc523f9e1d58848 (diff) | |
| download | rust-63f6845e570305a92eaf855897768617366164d6.tar.gz rust-63f6845e570305a92eaf855897768617366164d6.zip | |
Auto merge of #144458 - compiler-errors:no-witness-mini, r=lcnr
Remove the witness type from coroutine *args* (without actually removing the type) This does as much of rust-lang/rust#144157 as we can without having to break rust-lang/rust#143545 and/or introduce some better way of handling higher ranked assumptions. Namely, it: * Stalls coroutines based off of the *coroutine* type rather than the witness type. * Reworks the dtorck constraint hack to not rely on the witness type. * Removes the witness type from the args of the coroutine, eagerly creating the type for nested obligations when needed (auto/clone impls). I'll experiment with actually removing the witness type in a follow-up. r? lcnr
Diffstat (limited to 'compiler/rustc_hir_analysis')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect/generics_of.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect/generics_of.rs b/compiler/rustc_hir_analysis/src/collect/generics_of.rs index 31e9c3b80fb..e2462c2d465 100644 --- a/compiler/rustc_hir_analysis/src/collect/generics_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/generics_of.rs @@ -379,20 +379,14 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics { // for info on the usage of each of these fields. let dummy_args = match kind { ClosureKind::Closure => &["<closure_kind>", "<closure_signature>", "<upvars>"][..], - ClosureKind::Coroutine(_) => &[ - "<coroutine_kind>", - "<resume_ty>", - "<yield_ty>", - "<return_ty>", - "<witness>", - "<upvars>", - ][..], + ClosureKind::Coroutine(_) => { + &["<coroutine_kind>", "<resume_ty>", "<yield_ty>", "<return_ty>", "<upvars>"][..] + } ClosureKind::CoroutineClosure(_) => &[ "<closure_kind>", "<closure_signature_parts>", "<upvars>", "<bound_captures_by_ref>", - "<witness>", ][..], }; |
