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`
This commit is contained in:
commit
9835b90c91
6 changed files with 92 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue