diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-16 16:58:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-16 16:58:17 +0100 |
| commit | 9835b90c91e7012f27fc78a60599aab0011d2336 (patch) | |
| tree | e6845343d1b9cab06bc8cf4d5f654df318d0d591 /compiler/rustc_trait_selection/src | |
| parent | 039d6dc2896366b45cb71cef61dcbbd6cfc518a4 (diff) | |
| parent | ea562aeed553eaee9961a2adb259f48ffbe83666 (diff) | |
| download | rust-9835b90c91e7012f27fc78a60599aab0011d2336.tar.gz rust-9835b90c91e7012f27fc78a60599aab0011d2336.zip | |
Rollup merge of #92710 - jackh726:issue-92280, r=nikomatsakis
Include Projections when elaborating TypeOutlives Fixes #92280 In `Elaborator`, we elaborate that `Foo<<Bar as Baz>::Assoc>: 'a` -> `<Bar as Baz>::Assoc: 'a`. This is the same rule that would be applied to any other `Param`. If there are escaping vars, we continue to do nothing. r? `@nikomatsakis`
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/confirmation.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs index 36af78b66ed..669b6023397 100644 --- a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs +++ b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs @@ -206,7 +206,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { })?); if let ty::Projection(..) = placeholder_self_ty.kind() { - for predicate in tcx.predicates_of(def_id).instantiate_own(tcx, substs).predicates { + let predicates = tcx.predicates_of(def_id).instantiate_own(tcx, substs).predicates; + debug!(?predicates, "projection predicates"); + for predicate in predicates { let normalized = normalize_with_depth_to( self, obligation.param_env, |
