1
Fork 0

Revert "Auto merge of #91403 - cjgillot:inherit-async, r=oli-obk"

This reverts commit 3cfa4def7c, reversing
changes made to 5d8767cb22.
This commit is contained in:
Oli Scherer 2022-02-17 16:00:04 +00:00
parent 30b3f35c42
commit 86d17b98f2
34 changed files with 281 additions and 227 deletions

View file

@ -276,7 +276,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
debug!(?concrete_ty);
let first_own_region = match opaque_defn.origin {
hir::OpaqueTyOrigin::FnReturn(..) => {
hir::OpaqueTyOrigin::FnReturn(..) | hir::OpaqueTyOrigin::AsyncFn(..) => {
// We lower
//
// fn foo<'l0..'ln>() -> impl Trait<'l0..'lm>
@ -291,7 +291,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
}
// These opaque type inherit all lifetime parameters from their
// parent, so we have to check them all.
hir::OpaqueTyOrigin::AsyncFn(..) | hir::OpaqueTyOrigin::TyAlias => 0,
hir::OpaqueTyOrigin::TyAlias => 0,
};
// For a case like `impl Foo<'a, 'b>`, we would generate a constraint