diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-03-17 08:42:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-17 08:42:40 +0100 |
| commit | 246d989a30ad55e333a1870da96fab5066c5b8e9 (patch) | |
| tree | e4381edef150657305d90f8a5c00d74da4467d8b /src | |
| parent | edd6b4256557ec2cd9aac0c4de46848cc26931e5 (diff) | |
| parent | 8d922eba796a236dbfdd032d5e4c279519e02b60 (diff) | |
Rollup merge of #109198 - compiler-errors:new-rpitit-default-body, r=spastorino
Install projection from RPITIT to default trait method opaque correctly 1. For new lowering strategy `-Zlower-impl-trait-in-trait-to-assoc-ty`, install the correct default trait method projection predicates (RPITIT -> opaque). This makes default trait body tests pass! 2. Fix two WF-checking bugs -- first, we want to make sure that we're always looking for an opaque type in `check_return_position_impl_trait_in_trait_bounds`. That's because the RPITIT projections are normalized to opaques during wfcheck. Second, fix RPITIT's param-envs by not adding the projection predicates that we install on trait methods to make default RPITITs work -- I left a comment why. 3. Also, just a small drive-by for `rustc_on_unimplemented`. Not sure if it affects any tests, but can't hurt. r? ````@spastorino,```` based off of #109140
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 29c3afe0d95..989e091a0d2 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -426,7 +426,7 @@ fn clean_projection<'tcx>( cx: &mut DocContext<'tcx>, def_id: Option<DefId>, ) -> Type { - if cx.tcx.def_kind(ty.skip_binder().def_id) == DefKind::ImplTraitPlaceholder { + if cx.tcx.is_impl_trait_in_trait(ty.skip_binder().def_id) { let bounds = cx .tcx .explicit_item_bounds(ty.skip_binder().def_id) |
