rust/tests/ui/nll/ty-outlives
bors 8824994ccd Auto merge of #108691 - aliemjay:closure-subject, r=jackh726
fix multiple issues when promoting type-test subject

Multiple interdependent fixes.  See linked issues for a short description of each.

When Promoting a type-test `T: 'a` from within the closure back to its parent function, there are a couple pre-existing bugs and limitations. They were exposed by the recent changes to opaque types because the type-test subject (`T`) is no longer a simple ParamTy.

Commit 1:
Fixes #108635
Fixes #107426

Commit 2:
Fixes #108639

Commit 3:
Fixes #107516
2023-03-07 03:50:22 +00:00
..
impl-trait-captures.rs
impl-trait-captures.stderr
impl-trait-outlives.rs
impl-trait-outlives.stderr
issue-53789-1.rs
issue-53789-2.rs
issue-55756.rs
projection-body.rs
projection-implied-bounds.rs
projection-implied-bounds.stderr
projection-no-regions-closure.rs
projection-no-regions-closure.stderr
projection-no-regions-fn.rs
projection-no-regions-fn.stderr
projection-one-region-closure.rs
projection-one-region-closure.stderr
projection-one-region-trait-bound-closure.rs
projection-one-region-trait-bound-closure.stderr
projection-one-region-trait-bound-static-closure.rs
projection-one-region-trait-bound-static-closure.stderr
projection-two-region-trait-bound-closure.rs
projection-two-region-trait-bound-closure.stderr
projection-where-clause-env-wrong-bound.rs
projection-where-clause-env-wrong-bound.stderr
projection-where-clause-env-wrong-lifetime.rs
projection-where-clause-env-wrong-lifetime.stderr
projection-where-clause-env.rs
projection-where-clause-none.rs
projection-where-clause-none.stderr
projection-where-clause-trait.rs
ty-param-closure-approximate-lower-bound.rs
ty-param-closure-approximate-lower-bound.stderr
ty-param-closure-outlives-from-return-type.rs
ty-param-closure-outlives-from-return-type.stderr
ty-param-closure-outlives-from-where-clause.rs
ty-param-closure-outlives-from-where-clause.stderr
ty-param-fn-body.rs
ty-param-fn-body.stderr
ty-param-fn.rs
ty-param-fn.stderr
ty-param-implied-bounds.rs
wf-unreachable.rs
wf-unreachable.stderr